【问题标题】:JBoss EAP 6.4.2 is not listening from multiple remote serversJBoss EAP 6.4.2 没有监听多个远程服务器
【发布时间】:2019-12-26 12:33:56
【问题描述】:

我在设置 MDB 以在带有 Windows 操作系统的 JBoss EAP 6.4.2 上侦听多个远程服务器时遇到问题。当我设置 2 个服务器监听 connectionParameters 时,它只从其中一个服务器获取消息。

如果我只设置一台服务器来监听,它会很好地工作。但不能同时收听 2 个或更多服务器。以下是我的 MDB

@MessageDriven(mappedName = "TestTopicRemote", activationConfig = {   
        @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge"),
        @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Topic"),  
        @ActivationConfigProperty(propertyName = "destination", propertyValue = "cacheTopic"),  
        @ActivationConfigProperty(propertyName = "connectorClassName", propertyValue = "org.hornetq.core.remoting.impl.netty.NettyConnectorFactory,org.hornetq.core.remoting.impl.netty.NettyConnectorFactory"),          
        @ActivationConfigProperty(propertyName = "connectionParameters", propertyValue = "host=172.16.116.32;port=5445,host=172.16.116.107;port=5445"),
        @ActivationConfigProperty(propertyName = "user", propertyValue = "guest"),
        @ActivationConfigProperty(propertyName = "password", propertyValue = "password1")}
)

【问题讨论】:

    标签: jboss jms netty hornetq


    【解决方案1】:

    我相信您误解了connectionParameters 激活配置属性和MDB 功能提供的功能。 JBoss EAP 中的 JMS MDB 不能直接接收来自多个代理的消息。

    connectionParameters 激活配置属性支持多个条目,但实际上只会使用 一个。通常,这些条目用于集群中的所有服务器或 HA 对的主从服务器。

    Artemis 代理是否在集群的172.16.116.32172.16.116.107 上运行?如果是这样,假设集群中的代理具有适当的配置,连接到集群中任何节点的消费者应该能够接收生成到集群中任何其他节点的消息。

    【讨论】:

      猜你喜欢
      • 2023-03-20
      • 1970-01-01
      • 1970-01-01
      • 2017-09-21
      • 1970-01-01
      • 1970-01-01
      • 2014-09-22
      • 2021-07-10
      相关资源
      最近更新 更多