We have an activemq listener MDB with EJB, listening to a broker over SSL using activemq-rar.rar connector that has the broker, SSL cert, credential configurations. The listener is running well in JBOSS EAP 6.4. However, the need is to convert this MDB into Spring Boot ActiveMQ listener. I could see many articles examples about Spring Boot ActiveMQ with simple tcp://localhost:61616. Is there a complete reference to working example of producing message to and listening message from external broker over SSL using Spring Boot.
I have tried to create produce and consume messages using tcp per the instructions at https://www.devglan.com/spring-boot/spring-boot-jms-activemq-example and http://activemq.apache.org/how-do-i-use-ssl.html
spring.activemq.broker-url=ssl://localhost:61616
spring.activemq.user=admin
spring.activemq.password=admin
spring.activemq.keyStore=broker.ks
spring.activemq.keyStorePassword=password
javax.net.ssl.keyStore=client.ks
javax.net.ssl.keyStorePassword=password
javax.net.ssl.trustStore=client.ts
I am seeing below exception. Need help.
2019-01-14 00:54:33.209 INFO 13964 --- [ main] com.rime.springboot.amc.Application : Started Application in 5.783 seconds (JVM running for 7.081)
2019-01-14 00:54:38.203 INFO 13964 --- [enerContainer-1] o.s.j.l.DefaultMessageListenerContainer : JMS message listener invoker needs to establish shared Connection
2019-01-14 00:54:38.244 ERROR 13964 --- [enerContainer-1] o.s.j.l.DefaultMessageListenerContainer : Could not refresh JMS Connection for destination 'inbound.queue' - retrying using FixedBackOff{interval=5000, currentAttempts=0, maxAttempts=unlimited}. Cause: Could not connect to broker URL: ssl://localhost:61616. Reason: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
2019-01-14 00:54:43.341 ERROR 13964 --- [enerContainer-1] o.s.j.l.DefaultMessageListenerContainer : Could not refresh JMS Connection for destination 'inbound.queue' - retrying using FixedBackOff{interval=5000, currentAttempts=1, maxAttempts=unlimited}. Cause: Could not connect to broker URL: ssl://localhost:61616. Reason: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?