仅在其中一个订阅消息侦听器中多次获取相同的消息。我正在使用weblogic服务器并使用Ejb。 我正在使用持久订阅。我已经尝试过SHARED和CLONED两个但是分开但问题仍然相同
@ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Topic"),
@ActivationConfigProperty(propertyName = "subscriptionDurability", propertyValue = "Durable"),
@ActivationConfigProperty(propertyName = "subscriptionName", propertyValue = ""),
@ActivationConfigProperty(propertyName = "sharedSubscription", propertyValue = "TRUE")
})
克隆
@ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Topic"),
@ActivationConfigProperty(propertyName = "subscriptionDurability", propertyValue = "Durable"),
@ActivationConfigProperty(propertyName = "subscriptionName", propertyValue = ""),
@ActivationConfigProperty(propertyName = "cloneSupport", propertyValue = "ENABLED"),
所以我正在使用实现消息监听器的Abstarct类
public void onMessage(Message message) {
LOGGER.info("Receive Host message: {}", message);
我解析消息然后用一些不同的方法我发送
protected void createAndSendAckMessage(String msgToSend, Message request) throws JMSException {
Connection connection = null;
Session session = null;
MessageProducer producer = null;
try {
connection = getConnectionFactory().createConnection();
session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
在订阅者我扩展该抽象类并定义所有@ActivationConfigProperty
的不同MDB中我正在创建一个.binding文件来指定端口,主机,qmanager和主题信息