连接到Spring-Boot应用程序中的JBoss EAP 7.1上的队列时,会获得警告/错误



我已经在我的本地计算机上运行的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

我相信这里的问题是JBOSS EAP 7嵌入了ActiveMQ Artemis经纪人,但是您的依赖性是针对与ActiveMQ 5.X合作的库(即不同的经纪人(。查看来自EAP 7.1的" Helloworld JMS"快速启动的pom.xml。

要清楚,ActiveMQ Artemis 确实支持5.x客户端,但我相信默认情况下,功能是在EAP中被禁用的。

相关内容

最新更新