ActiveMQ "Classic" to ActiveMQ Artemis migration / HTTP transport configuration (consume and produce messages using HTTP tunneling)

552 Views Asked by At

I'm having a problem to connect to Artemis using HTTP instead of TCP.

So I have on my ActiveMQ "Classic" a configuration to connect to the broker using HTTP just like that:

<transportConnectors>
    <transportConnector name="openwire" uri="tcp://0.0.0.0:61616?transport.maximumConnections=1000&amp;transport.wireFormat.maxFrameSize=104857600&amp;transport.keepAlive=true&amp;transport.trace=true&amp;transport.useKeepAlive=true&amp;transport.connectionTimeout=30000" />
    <transportConnector name="http" uri="http://0.0.0.0:9090?transport.maximumConnections=1000&amp;transport.wireFormat.maxFrameSize=104857600&amp;transport.keepAlive=true&amp;transport.trace=true&amp;transport.useKeepAlive=true&amp;transport.connectionTimeout=30000" />
</transportConnectors>

With this configuration I was able to connect to my ActiveMQ using e.g. http://localhost:9090.

Now I am migrating to Artemis version 2.28.0, and when I try to configure an http connector like that:

<connectors>
   <connector name="http-connector">http://0.0.0.0:8080?httpEnabled=true</connector>
</connectors>

But when we start up the broker we have the error that the schema is not found:

java.lang.RuntimeException: Schema http not found
    at org.apache.activemq.artemis.core.config.ConfigurationUtils.parseConnectorURI(ConfigurationUtils.java:190)
    at org.apache.activemq.artemis.core.deployers.impl.FileConfigurationParser.parseConnectorTransportConfiguration(FileConfigurationParser.java:1622)

We also tried configuration it using tcp connections with httpEnabled=true according to Artemis documentation (see "Configuring Netty HTTP"), but this also does not wrong when we try to connect using HTTP.

We have multiple consumers already connected to our ActiveMQ "Classic" via HTTP and we are aiming to do a DNS switch from "Classic" to Artemis without impacting our consumers because would be hard to talk to all of them. This is the scenario: http://broker:8080 is now pointing to ActiveMQ "Classic" and we want to reroute this domain to point to Artemis.

1

There are 1 best solutions below

0
Justin Bertram On

Unfortunately this won't be possible as Artemis doesn't support the HTTP transport as used by OpenWire clients. As you discovered in the documentation, Artemis has an equivalent feature for tunneling communication for the core protocol via HTTP, but it isn't compatible with OpenWire.

Generally speaking, HTTP is not a good protocol for messaging and is rarely recommended. It is available as a stop-gap measure for exceptional situations where "normal" connectivity is not possible for whatever reason.