gpt4 book ai didi

activemq - javax.jms.InvalidClientIDException : Broker: localhost - Client: FS_Proceduer already connected from/127. 0.0.1:port

转载 作者:行者123 更新时间:2023-12-03 22:10:16 27 4
gpt4 key购买 nike

你如何解决这个 JMSException?谢谢!

代理:本地主机 - 客户端:FS_Proceduer 已连接

javax.jms.InvalidClientIDException: Broker: localhost - Client: FS_Proceduer already connected from /127.0.0.1:56556

这是由这个方法触发的:
private void connectAndInitActiveMQ() throws JMSException{
logger.debug("It's ready to connect to jms service");
if(null != connection){
try{
logger.debug("Closing connection");
connection.close();
}catch(Exception e){
logger.error(e.getMessage(), e);
}
}
logger.debug("Creating a new connection");

logger.debug("Is queueConnectionFactory null? "+(queueConnectionFactory==null));

connection = queueConnectionFactory.createConnection();

logger.debug("Is the new connection null? "+(connection==null));

logger.debug("Starting the new connection");
connection.start();

logger.debug("Connected successfully: " + connection);

session = connection.createSession(true, Session.AUTO_ACKNOWLEDGE);
queue = session.createQueue(queueName);
messageProducer = session.createProducer(queue);
}

是工厂的问题吗?还是其他什么来源?

最佳答案

如果您将连接配置为具有相同的客户端 ID,则会出现此错误。 JMS 规范明确指出,在任何给定时间,只有一个连接可以连接到具有相同客户端 ID 的远程,解决您的配置,事情应该可以正常工作。

关于activemq - javax.jms.InvalidClientIDException : Broker: localhost - Client: FS_Proceduer already connected from/127. 0.0.1:port,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31700049/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com