javajmsactivemq-classicactivemq-artemis

Can an Apache ActiveMQ Artemis client connect to an existing ActiveMQ Classic 5.15.x broker?


ActiveMQ Classic 5.15.3 does not support the JMS 2.0 API. Most developers suggest projects use ActiveMQ Artemis if they want JMS 2.0 client support. Can an ActiveMQ Artemis client connect to an ActiveMQ Classic broker?


Solution

  • No, the Artemis JMS client uses the Artemis Core protocol which the ActiveMQ 5.x broker does not understand so you cannot connect to it with that client. Even if you could that wouldn't enable any JMS 2.0 features as the broker needs to support the 2.0 features like shared subscriptions etc.

    Depending on what you are trying to do there's a good chance you can still do it with the ActiveMQ JMS client over JMS 1.1 APIs such as using Virtual Topics to implement shared style subscription behaviors.

    The Artemis Broker does understand the OpenWire protocol so you can use the same ActiveMQ 5.x JMS client to connect to both however that client is limited to the JMS 1.1 API.

    Both brokers also support AMQP 1.0 so the Qpid JMS AMQP 1.0 client would be able to talk to either broker. Qpid-JMS is a JMS 2.0 based client so the features of 2.0 like shared subscriptions wouldn't work against ActiveMQ 5.x but some of the other syntactic sugar type APIs of 2.0 like JMSContext based bits would mostly work.