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 <eric.vinc...@atosorigin.com> 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
> (http://activemq.apache.org/advisory-message.html) 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: 
> http://activemq.2283324.n4.nabble.com/Connection-ClientId-Identifier-and-AdvisoryMessage-tp3399952p3399952.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>



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

Reply via email to