Return-Path: Delivered-To: apmail-geronimo-activemq-users-archive@www.apache.org Received: (qmail 28818 invoked from network); 20 Jun 2006 18:24:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 20 Jun 2006 18:24:18 -0000 Received: (qmail 56446 invoked by uid 500); 20 Jun 2006 18:24:17 -0000 Delivered-To: apmail-geronimo-activemq-users-archive@geronimo.apache.org Received: (qmail 56430 invoked by uid 500); 20 Jun 2006 18:24:17 -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 56421 invoked by uid 99); 20 Jun 2006 18:24:17 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Jun 2006 11:24:17 -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.184.229 as permitted sender) Received: from [64.233.184.229] (HELO wr-out-0506.google.com) (64.233.184.229) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Jun 2006 11:24:15 -0700 Received: by wr-out-0506.google.com with SMTP id 58so1280573wri for ; Tue, 20 Jun 2006 11:23:54 -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=f1T1jkzv5gcLIbCtKIGOV+gathRQaBNE2aDtwCE/eiBrb8g5j0nLnSrD3OAmUbMJnpLrUh42lZi2fAnmJsC8BA+HLyiwHeY2+n5xwAW48XfXjH58IoF0gORZBT2tUw1N4Y3HtdB+nOlO7uD/hqoWHRDoyRvWgOqSH7OwEtc1d40= Received: by 10.64.3.9 with SMTP id 9mr1179211qbc; Tue, 20 Jun 2006 11:23:54 -0700 (PDT) Received: by 10.65.83.14 with HTTP; Tue, 20 Jun 2006 11:23:54 -0700 (PDT) Message-ID: Date: Tue, 20 Jun 2006 14:23:54 -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_161418_7797330.1150827834503" References: <4957209.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_161418_7797330.1150827834503 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 6/20/06, James Strachan wrote: > > On 6/20/06, Thomas Swindells wrote: > > James.Strachan wrote: > > > > > > On 6/19/06, Sanjiv Jivan wrote: > > >> > 2. Is there a way to detach a message group affinity to a > particular > > >> broker. > > >> > > >> >Just set JMSXGroupSeq to zero on the last message which 'closes' the > > >> >message group so if another message is sent in the future with the > > >> >same group ID it will be reassigned to a new consumer. > > >> > > >> >message.setIntProperty("JMSXGroupSeq", 0); > > >> > > >> This would reset all the affinity of all the message groups, right? > > > > > > No - just the message group for the JMSXGroupId setting. > > > I should have been more clear... to clear message group FOO use > > > > > > message.setStringProperty("JMSXGroupID", "FOO"); > > > message.setIntProperty("JMSXGroupSeq", 0); > > > > > Reading the Message group page > > (http://activemq.org/site/message-groups.html) there is probably a minor > bug > > here in that it would close all messsage groups with the same Hash as > "FOO", > > although in practice for a well designed system expecting that msg > groups > > could change this shouldn't be a problem. Of course the chances of a > hash > > clash for relatively short group id's is pretty tiny. > > Yeah - hashing collisions should be fairly unlikely - though its a RAM > v risk tradeoff - the larger the number of hash buckets, the more RAM > used but the less likely a collision. > > Though worse case a message group is closed and reopened - which just > rebalances the association of message groups to consumers so it > doesn't cause much harm (*). This would cause harm if a message group is used as a basis of a stateful conversation with the chosen server (which embeds a broker)which I how I require to use them in my usecase. Is not like a stateless stock quote request which any server can respond to.. its more like startConversation(A), getResults(A) and if getResults(A) goes to the wrong server, its an error condition since the conversation was started with another server. I do not want to get in the business of state replicating servers, just want to partition conversation based load based (rather that individual request based load balancing). ------=_Part_161418_7797330.1150827834503--