I am trying to migrate to Spring Boot 3 with the new namespace jakarta.xx instead of javax.xx but the ActiveMQ "Classic" client has not been updated and was deprecated. Is there a way to continue using the old ActiveMQ client?
I tried the new ActiveMQ Artemis client but it seems like they are not interoperable with the ActiveMQ "Classic" server.
Including the old ActiveMQ client results in not being able to use JMSTemplate for configuration because JMSTemplate uses jakarta.xx and expects a ConnectionFactory
from jakarta.xx not javax.xx
CodePudding user response:
As you noticed there is no ActiveMQ client that supports the Jakarta namespace JMS dependency or in fact none that supports JMS 2.0 so you really need to move to something else such as an ActiveMQ Artemis broker and the ActiveMQ Artemis client or Qpid JMS AMQP client v2.1.0 which both support JMS 2.0 and use the Jakarta APIs.
If you are dead set on sticking with ActiveMQ 5.x you can try using the Qpid JMS v2.1.0 client which does use the Jakarata JMS API but you will need to be somewhat careful as the 5.x broker doesn't support JMS 2.0 so some parts of the API can trigger unexpected behaviors. The AMQP support in the 5.x broker is not as fully integrated and JMS 2.0 aware as that of the Artemis broker so you can encounter issues you wouldn't see if you moved on to the Artemis broker.