【发布时间】:2018-03-27 21:27:56
【问题描述】:
我在本地机器上运行的 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
【问题讨论】:
-
是否涉及堆栈跟踪?如果是这样,请将其包含在您的问题中。如果没有,请详细说明应用程序在一般情况下正在做什么,特别是在发生错误时应用程序在做什么。
标签: spring-boot jboss7.x spring-jms activemq-artemis