Return-Path: Delivered-To: apmail-geronimo-activemq-users-archive@www.apache.org Received: (qmail 54493 invoked from network); 19 Jun 2006 16:09:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 19 Jun 2006 16:09:58 -0000 Received: (qmail 95412 invoked by uid 500); 19 Jun 2006 16:09:58 -0000 Delivered-To: apmail-geronimo-activemq-users-archive@geronimo.apache.org Received: (qmail 95391 invoked by uid 500); 19 Jun 2006 16:09:57 -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 95382 invoked by uid 99); 19 Jun 2006 16:09:57 -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:09:57 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=RCVD_IN_BL_SPAMCOP_NET,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of james.strachan@gmail.com designates 72.14.214.202 as permitted sender) Received: from [72.14.214.202] (HELO hu-out-0102.google.com) (72.14.214.202) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Jun 2006 09:09:56 -0700 Received: by hu-out-0102.google.com with SMTP id 28so540014hug for ; Mon, 19 Jun 2006 09:09:34 -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:content-transfer-encoding:content-disposition:references; b=HqlT3BSD+CxWVKWD/eqZ8NtNKtMc9exAg/sqYG4Pkl5AeP8fIjKpMdtBtieXSLlq5QVa+0iPFYZp5504qXOkzxSmL4S3TeIoZgW7TVGPNjbtypwHO4oAuS+DuE6QbH28TR9AMb93OdZ4HqykW+lKCJglA8TP3JBpS18LYFR7Iq4= Received: by 10.67.101.10 with SMTP id d10mr1997405ugm; Mon, 19 Jun 2006 09:09:34 -0700 (PDT) Received: by 10.66.255.17 with HTTP; Mon, 19 Jun 2006 09:09:34 -0700 (PDT) Message-ID: Date: Mon, 19 Jun 2006 17:09:34 +0100 From: "James Strachan" To: activemq-users@geronimo.apache.org Subject: Re: detaching message group affinity In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N 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. 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 * if the message group is explicitly closed by a message containing a JMSXGroupId and a JMSXGroupSeq of value 0 -- James ------- http://radio.weblogs.com/0112098/