On 04/04/2013 09:52 AM, Alin wrote:
ActiveMQ 5.8.0 - How can I connect 2 consumers residing on the same host to
the same ActiveMQ instance?
The scenario is the following : I have 2 independent MQ consumers running on
the same host(I can not move them to different hosts). If one of the
consumers is connected to the ActiveMq instance, whenever I'll try to start
up the second consumer, the error below will be returned:


  [2013-04-04
08:33:21,291][main][ERROR][com.nuance.csportal.commons.messaging.JMSConnectionManager]init
caught exception.
javax.jms.InvalidClientIDException: Broker: jdbcBroker - Client: <client
host> already connected from tcp://<client host>:40801
        at
org.apache.activemq.broker.region.RegionBroker.addConnection(RegionBroker.java:216)
        at
org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:85)
        at
org.apache.activemq.advisory.AdvisoryBroker.addConnection(AdvisoryBroker.java:79)
        at
org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:85)
        at
org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:85)
        at
org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:91)
        at
org.apache.activemq.broker.TransportConnection.processAddConnection(TransportConnection.java:766)
        at
org.apache.activemq.broker.jmx.ManagedTransportConnection.processAddConnection(ManagedTransportConnection.java:79)
        at
org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:139)
        at
org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:329)
        at
org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:184)
        at
org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:50)
        at
org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:113)
        at
org.apache.activemq.transport.AbstractInactivityMonitor.onCommand(AbstractInactivityMonitor.java:288)
        at
org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)
        at
org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:214)
        at
org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:196)
        at java.lang.Thread.run(Thread.java:722)
[2013-04-04


The broker URL i use is:
failover:(tcp://ActiveMQhost1.nuance.com:61616,tcp://ActiveMQhost2:61616)?updateURIsSupported=false&jms.prefetchPolicy.all=1&randomize=false


Any ideas?

Thanks


Each consumer needs its own unique Client Id they cannot be the same.





--
View this message in context: 
http://activemq.2283324.n4.nabble.com/ActiveMQ-5-8-0-How-can-I-connect-2-consumers-residing-on-the-same-host-to-the-same-ActiveMQ-instance-tp4665540.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.



--
Tim Bish
Sr Software Engineer | RedHat Inc.
[email protected] | www.fusesource.com | www.redhat.com
skype: tabish121 | twitter: @tabish121
blog: http://timbish.blogspot.com/

Reply via email to