问题描述
我已经在activemq中建立了一个经纪人网络,我如何从我的客户端应用程序连接到该网络
I have setup a network of brokers in activemq, how do i connect to that from my client application
我尝试过
network:static:(tcp://master1.IP:61616,tcp://master2.IP:61617)和
network:static:(tcp://master1.IP:61616,tcp://master2.IP:61617) and
但是我明白了以下异常
javax.jms.JMSException: Uncategorized exception occured during JMS processing; nested exception is javax.jms.JMSException: Could not create Transport. Reason: java.io.IOException: Transport scheme NOT recognized: [network];
有
静态:(tcp: //master1.IP:61616,tcp://master2.IP:61617)
static:(tcp://master1.IP:61616,tcp://master2.IP:61617)
我遇到异常
javax.jms.JMSException: Uncategorized exception occured during JMS processing; nested exception is javax.jms.JMSException: Could not create Transport. Reason: java.io.IOException: Transport scheme NOT recognized: [static];
谢谢
推荐答案
希望故障转移到代理实例的静态列表的客户端应改用failover://传输。 (来源:)
"Clients wishing to failover to a static list of broker instances, should use the failover:// transport instead." (from : http://activemq.apache.org/static-transport-reference.html)
因此正确的语法为:
故障转移:(tcp:// master1 .IP:61616,tcp://master2.IP:61617)
failover:(tcp://master1.IP:61616,tcp://master2.IP:61617)
这篇关于如何从客户端应用程序连接到activemq代理网络?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!