【发布时间】: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")}
)
【问题讨论】: