我在本地机器上运行的JBoss EAP 7.1服务器上部署了一个activemq队列(QueueA)。我有一个Spring Boot应用程序,它也在同一台机器上运行,并且有一个实现“MessageListener”的队列侦听器。我在Spring Boot应用程序中使用了以下依赖项:
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