activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Tully <>
Subject Re: Connection ClientId Identifier and AdvisoryMessage.
Date Wed, 23 Mar 2011 17:27:42 GMT
the jms clientId needs to be unique, only one connection with a given
id will be allowed.

you can define the prefix for a connection id via the clientIDPrefix
property. So tcp://xx:port?jms.clientIDPrefix="ID:<myHostName>myProject.".
The default value for the prefix is "ID:<hostName> so it would be good
to keep the host name.
This is combined with a seed such that it is unique.

Correct, the ConnectionInfo is in the body of the Connection advisory message.

On 23 March 2011 16:34, Eric-AWL <> wrote:
> Hi every body
> I would want to be able to easily identify each of my TCP distant connection
> to my brokers without having to program anything on the client side.
> I imagine using the jms.clientId on the client side with
> "tcp://myhost:xxxx?jms.clientID=myProject" as the connection URL, and
> catching AdvisoryMessage (ActiveMQ.Advisory.Connection) with another JMS
> "administrative" connection on the same broker. By this way, I hope that
> advisory messages received by my "administrative" connection, gives me the
> information that "myProject" justconnected or just disconnected.
> I imagine that connectionInfo structure is the core message that is present
> on the topic at each connection, but the documentation
> ( doesn't mention it
> clearly.
> Is it a good and supported way to detect and identify connections ?
> What would happen if 2 connections simultaneously use the same clientID ?
> Thank you
> Eric-AWL
> --
> View this message in context:
> Sent from the ActiveMQ - User mailing list archive at


View raw message