activemq-classicjakarta-migration

ActiveMQ Classic HTTP Jakarta


I’m using ActiveMQ Classic 5.18.1 with Spring 6 and the Jakarta namespace. I’m using activemq-client-jakarta for TCP connections, but now I’m facing a new problem. I need to deal with http, but no activemq-http-jakarta jar is provided.

Are there any plans to create an activemq-http-jakarta jar as was done for activemq-client?

ActiveMQConnectionFactory is coming from activemq-client-jakarta.

Here is the log I'm getting when I try to send message over https protocol:

Caused by: jakarta.jms.JMSException: Transport scheme NOT recognized: [https]
    at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:91)
    at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1483)
    at org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1548)
    at org.apache.activemq.ActiveMQConnection.createSession(ActiveMQConnection.java:370)
    at org.springframework.jms.core.JmsTemplate.executeLocal(JmsTemplate.java:950)
    ... 170 common frames omitted
Caused by: java.io.IOException: Transport scheme NOT recognized: [https]
    at org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:30)
    at org.apache.activemq.transport.TransportFactory.findTransportFactory(TransportFactory.java:185)
    at org.apache.activemq.transport.TransportFactory.compositeConnect(TransportFactory.java:90)
    at org.apache.activemq.transport.failover.FailoverTransport.doReconnect(FailoverTransport.java:1020)
    at org.apache.activemq.transport.failover.FailoverTransport$2.iterate(FailoverTransport.java:151)
    at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:133)
    at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:48)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    ... 1 common frames omitted
Caused by: java.io.IOException: Could not find factory class for resource: META-INF/services/org/apache/activemq/transport/https
    at org.apache.activemq.util.FactoryFinder$StandaloneObjectFactory.loadProperties(FactoryFinder.java:104)
    at org.apache.activemq.util.FactoryFinder$StandaloneObjectFactory.create(FactoryFinder.java:61)
    at org.apache.activemq.util.FactoryFinder.newInstance(FactoryFinder.java:154)
    at org.apache.activemq.transport.TransportFactory.findTransportFactory(TransportFactory.java:182)
    ... 8 common frames omitted

Solution

  • As far as I can tell no changes are required to the activemq-http jar for it to work with the activemq-client-jakarta jar so that you can use the http or https URL schemes. You just need to have both jars on the classpath of your application which, given the stack-trace you pasted, is clearly not the case.