我在运行在本地计算机上的QueueA EAP7.1服务器上部署了一个activemq (QueueA)。我有一个Spring应用程序,它也运行在同一台机器上,并为这个队列提供了一个监听器,它实现了"MessageListener“。我在Spring应用程序中使用了以下依赖项:
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发布于 2018-03-29 20:04:17
我认为这里的问题是JBoss EAP 7嵌入了ActiveMQ Artemis,但是您的依赖关系是用于使用ActiveMQ 5.x (即不同的代理)的库。查看来自pom.xml的"Helloworld JMS“EAP 7.1的快速启动。
显然,ActiveMQ Artemis 支持 5.x客户端,但我认为在EAP中默认禁用功能。
https://stackoverflow.com/questions/49522688
复制相似问题