You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by JacobS <ja...@gmail.com> on 2012/06/28 18:22:46 UTC

Identifying disconnected client id in a network of brokers

We are using AMQ 5.6 and we want to add 'network of brokers' support.

The problem is, we are using the connection id ( we added a custom clientid
prefix to the  connectionFactory ) that is received in RemoveInfo when an
advisory on a consumer removed arrives, in order to identify disconnected
clients. 

but when the client is connected to a broker other than our master broker
the connection id received on disconnection is not of the client.

Any ideas how to identify a disconnected client in a network of brokers ?

--
View this message in context: http://activemq.2283324.n4.nabble.com/Identifying-disconnected-client-id-in-a-network-of-brokers-tp4653652.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Identifying disconnected client id in a network of brokers

Posted by JacobS <ja...@gmail.com>.
Thanks, that worked

--
View this message in context: http://activemq.2283324.n4.nabble.com/Identifying-disconnected-client-id-in-a-network-of-brokers-tp4653652p4653686.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Identifying disconnected client id in a network of brokers

Posted by Gary Tully <ga...@gmail.com>.
It is not that easy but I think you have some options.

If you don't use conduit subscriptions (so conduit=false), there will
be a one to one mapping between remote consumers and network
consumers. This will work if you don't network topics

If you need to use conduit=true, you may be able to track the
ConsumerInfo advisory and access the
org.apache.activemq.command.ConsumerInfo#getNetworkConsumerIds
this array tracks the original consumerId that causes the network
consumer be created on demand. It is tracked so that duplicate
suppression can be implemented in cyclic networks.
see usage at: org.apache.activemq.network.DemandForwardingBridgeSupport#duplicateSuppressionIsRequired

If you track the additions and remember the networConsumerId, then you
will be able to match against a remove.

hope this helps

On 28 June 2012 17:22, JacobS <ja...@gmail.com> wrote:
> We are using AMQ 5.6 and we want to add 'network of brokers' support.
>
> The problem is, we are using the connection id ( we added a custom clientid
> prefix to the  connectionFactory ) that is received in RemoveInfo when an
> advisory on a consumer removed arrives, in order to identify disconnected
> clients.
>
> but when the client is connected to a broker other than our master broker
> the connection id received on disconnection is not of the client.
>
> Any ideas how to identify a disconnected client in a network of brokers ?
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Identifying-disconnected-client-id-in-a-network-of-brokers-tp4653652.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.



-- 
http://fusesource.com
http://blog.garytully.com