activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Posta <christian.po...@gmail.com>
Subject Re: ActiveMQ 5.8.0 - How can I connect 2 consumers residing on the same host to the same ActiveMQ instance?
Date Thu, 04 Apr 2013 16:28:18 GMT
Seems the connections are trying to connect using the same clientID. Give
your connections different clientIDs:

connection.setClientID(<new id here>)


On Thu, Apr 4, 2013 at 6:52 AM, Alin <bb_gara@yahoo.com> 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
>
>
>
>
>
>
> --
> 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.
>



-- 
*Christian Posta*
http://www.christianposta.com/blog
twitter: @christianposta

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message