I have deployed an activemq queue(QueueA) on JBoss EAP 7.1 server running on my local machine. I have a Spring-Boot app which is also running on the same machine and having a listener for this queue which implements "MessageListener". I have used the following dependencies in my Spring-Boot app :
1. <dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jms</artifactId>
</dependency>
2.
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-activemq</artifactId>
</dependency>
3.
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-broker</artifactId>
</dependency>
I have created connection factory the following way :
ActiveMQConnectionFactory connectionFactory =
new ActiveMQConnectionFactory();
connectionFactory.setBrokerURL(tcp://localhost:8080);
connectionFactory.setUserName("Username");
connectionFactory.setPassword("Password");
Now when I start my Spring-Boot app it gives me the following error initially :
ERROR : Not Connected: [ClusterNode]
and following error repetitively until I stop the app:
ERROR : DefaultMessageListenerContainer: Error : Could not refresh JMS Connection for destination 'QueueA'.Cause: Cannot send, channel has already failed: tcp://127.0.0.1:8080
Can anyone please help in this regard ? or Point me to some documentation which would be helpful