From users-return-27016-apmail-activemq-users-archive=activemq.apache.org@activemq.apache.org Wed Mar 23 19:14:53 2011 Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 2415 invoked from network); 23 Mar 2011 19:14:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 23 Mar 2011 19:14:49 -0000 Received: (qmail 84956 invoked by uid 500); 23 Mar 2011 17:28:09 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 84935 invoked by uid 500); 23 Mar 2011 17:28:09 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 84926 invoked by uid 99); 23 Mar 2011 17:28:09 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Mar 2011 17:28:09 +0000 X-ASF-Spam-Status: No, hits=0.6 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of gary.tully@gmail.com designates 209.85.216.171 as permitted sender) Received: from [209.85.216.171] (HELO mail-qy0-f171.google.com) (209.85.216.171) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Mar 2011 17:28:04 +0000 Received: by qyj19 with SMTP id 19so5187623qyj.2 for ; Wed, 23 Mar 2011 10:27:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=on6UeBDcyIMvGTczXzGzGqfrlgABJtvyacvY1O1oGkc=; b=vVItMTDP0FqAT00j+Nog/OiavzE69gBvyoQpneaX8U1qZVyXc4tlSGt+K9iSAoH7La IPSKXYZ4pl8KbiZWgcrWMH6o1kmQbLYC41qA+RujLAQ5trfOjAITsZXZ300xEC0U4iRO keIdxPTiApi8ea0uEJ1iLpZN0CmLn6M6yyCyQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=pmZXBY5MSt2tI43pAxv/HFR+mj+zWmOf6TvxuFZ2NUq9Y9RoZTf5vduLdQ3/wE2+Hn H9gcBm0A5u6B6nLNHvJsgxMbZRs6SUhAY2GJCKaxmvIF4WH/r6pWLj9Zf3OcVon8D/6u VbPe13RfU5W8UPI2K4pyWfx5y7cd+2UcruUU8= MIME-Version: 1.0 Received: by 10.229.68.98 with SMTP id u34mr5583012qci.200.1300901262577; Wed, 23 Mar 2011 10:27:42 -0700 (PDT) Received: by 10.229.68.163 with HTTP; Wed, 23 Mar 2011 10:27:42 -0700 (PDT) In-Reply-To: <1300898062305-3399952.post@n4.nabble.com> References: <1300898062305-3399952.post@n4.nabble.com> Date: Wed, 23 Mar 2011 17:27:42 +0000 Message-ID: Subject: Re: Connection ClientId Identifier and AdvisoryMessage. From: Gary Tully To: users@activemq.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org 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:myProject.". The default value for the prefix is "ID: 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 > (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