Return-Path: Delivered-To: apmail-geronimo-activemq-users-archive@www.apache.org Received: (qmail 63349 invoked from network); 19 Jun 2006 16:30:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 19 Jun 2006 16:30:02 -0000 Received: (qmail 49107 invoked by uid 500); 19 Jun 2006 16:30:01 -0000 Delivered-To: apmail-geronimo-activemq-users-archive@geronimo.apache.org Received: (qmail 49082 invoked by uid 500); 19 Jun 2006 16:30:01 -0000 Mailing-List: contact activemq-users-help@geronimo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: activemq-users@geronimo.apache.org Delivered-To: mailing list activemq-users@geronimo.apache.org Received: (qmail 49073 invoked by uid 99); 19 Jun 2006 16:30:01 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Jun 2006 09:30:01 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of sanjiv.jivan@gmail.com designates 64.233.162.198 as permitted sender) Received: from [64.233.162.198] (HELO nz-out-0102.google.com) (64.233.162.198) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Jun 2006 09:30:00 -0700 Received: by nz-out-0102.google.com with SMTP id 40so19257nzk for ; Mon, 19 Jun 2006 09:29:39 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=UcSo+ZUwqJzNFFGsASYvSGoL0+JXNqvN03gDCTRnVTgjpmH3/uVGdd295GMcywUgHVt2+EWdJKV6wuUvRpSaMAqVQ1vdJiJAmOzeI3JVH39kXd/uIWfBKvxZRuwsZPhVLB/+2eHSd0nfA2F3DgdRw/QouF7MvueZk6XIyqR5N2M= Received: by 10.65.93.17 with SMTP id v17mr5773559qbl; Mon, 19 Jun 2006 09:29:39 -0700 (PDT) Received: by 10.65.83.14 with HTTP; Mon, 19 Jun 2006 09:29:39 -0700 (PDT) Message-ID: Date: Mon, 19 Jun 2006 12:29:39 -0400 From: "Sanjiv Jivan" To: activemq-users@geronimo.apache.org Subject: Re: detaching message group affinity In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_142427_28138383.1150734579773" References: X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_142427_28138383.1150734579773 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 6/19/06, James Strachan wrote: > > On 6/19/06, Sanjiv Jivan wrote: > > On 6/19/06, James Strachan wrote: > > > > > > > > > > Who is the owner of the "JMSXGroupID" to broker mapping? Is it the > JMS > > > > Connection or a JMSSession? I need to send messages by different > Message > > > > Groups from the same client application. I would like to understand > if I > > > > need to create separate JMS Connections for each message group based > > > > conversation, or separate JMS Sessions would suffice. A quick look > at > > > the > > > > source seems to indicate that Message Groups are held at the JMS > > > connection > > > > level (ActiveMQConnectionMetaData). Can you confirm? > > > > > > A broker manages Message Groups for its consumers. Its nothing to do > > > with connections per se - its purely a mapping of JMSXGroupID to > > > message consumer in a broker. > > > > > > A consumer being the value in JMSReplyTo? > > Not necessarily - a consumer being some POJO created via > Session.createMessageConsumer(). > > But if the consumers are using temporary queues/topics then they are > nearly the same thing. > > > > I guess what I'm having difficulty > > understanding is where is the correlation between a single message with > " > > message.setIntProperty("JMSXGroupSeq", 0);" to MessageGroupID being > made. Is > > it based on JMSReplyTo value provided by the producer sending the > message? > > > If someone is sending a message and they want to 'close' a message > group, they set the JMSXGroupSeq header along with the JMSXGroupID > header. aha, this was the thing I was missing. ie JMSXGroupID *and* JMSXGroupSeq should be send in the same message for it to detach the message group affinity for the specified JMSXGroupID. If some other node who is not a JMS sender wants to close a message > group, you could always just send a dummy message. > > > > What is the expected behaviour in such a scenario (this is related to > issue > > AMQ-760): A network of 2 brokers has been set up. A client sends several > > messages to MG1 and MG2 which are received by SERVER1 and SERVER2 > > respectively. The client process terminates (ie the JMSConenction, > > session etc are destroyed). The client comes up an send messages to MG1 > and > > MG2. Is is guaranteed that MG1 and MG2 go to the designated servers from > the > > previous run (SERVER1 and SERVER2 respectively). > > Message groups is a broker-side thing; the only thing which affects > which consumer is associated with a message group is > > * when the consumer is closed (e.g. as a result of a Connection > close), its message groups are put back in the pool to be re-assigned > to a consumer This is extremely useful to know. Maybe you can add this info too on the ActiveMQ web site. * if the message group is explicitly closed by a message containing a > JMSXGroupId and a JMSXGroupSeq of value 0 > > -- With this info I now have a better understanding of how things work and have a bunch of things that I can try. Will report back with results/ further questions. I realize you guys are very busy so thanks so much for being patient and answering my questions in detail. Sanjiv ------=_Part_142427_28138383.1150734579773--