Return-Path: Delivered-To: apmail-geronimo-activemq-users-archive@www.apache.org Received: (qmail 6084 invoked from network); 8 Jun 2006 18:02:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 8 Jun 2006 18:02:33 -0000 Received: (qmail 58379 invoked by uid 500); 8 Jun 2006 18:02:32 -0000 Delivered-To: apmail-geronimo-activemq-users-archive@geronimo.apache.org Received: (qmail 58353 invoked by uid 500); 8 Jun 2006 18:02:32 -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 58344 invoked by uid 99); 8 Jun 2006 18:02:32 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Jun 2006 11:02:32 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of chirino@gmail.com designates 64.233.184.234 as permitted sender) Received: from [64.233.184.234] (HELO wr-out-0506.google.com) (64.233.184.234) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Jun 2006 11:02:31 -0700 Received: by wr-out-0506.google.com with SMTP id 58so681272wri for ; Thu, 08 Jun 2006 11:02:10 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=FsCGC947MduXn+B6hGeul8vZwGKvzYiNFAEgZvYGw7Wq0U0jfzDOlnZF9aCCWOHH+qvEv5q1VOBn66NADnLK4/vPIkWj6d1jqhTV7b3B7QyZ6puAu8lprI3Di2M1cHMSmOSAlGX+RPfNKUgfYuyNXQxzRZAw/ozuEWkvQ3cWa6g= Received: by 10.65.98.11 with SMTP id a11mr2054001qbm; Thu, 08 Jun 2006 11:02:09 -0700 (PDT) Received: by 10.65.218.1 with HTTP; Thu, 8 Jun 2006 11:02:09 -0700 (PDT) Message-ID: Date: Thu, 8 Jun 2006 14:02:09 -0400 From: "Hiram Chirino" Sender: chirino@gmail.com To: activemq-users@geronimo.apache.org Subject: Re: Exclusive consumer question In-Reply-To: <84A1E97D6D2DA04888FA9481D577CDA337E782@exch-bel3.attachmate.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <84A1E97D6D2DA04888FA9481D577CDA337E782@exch-bel3.attachmate.com> X-Google-Sender-Auth: 62a521b8050a5cd2 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N On 6/7/06, Richard Taylor wrote: > Hi Gang, > > > > Our group is working on a clustering solution in which we're using > ActiveMQ for our messaging. We have a group of "nodes" clustered > together, all communicating via predetermined JMS Queues / Topics, using > a network of brokers under the covers. > > > > At any given time, one node is the "coordinator" and I'm looking for a > way for nodes to send messages to the current coordinator regardless of > who it currently is. Which node is the coordinator is determined by > another service. I've been thinking of having one "coordinator" queue > and have been trying to determine the best way to route messages to the > current coordinator node. > > > > Possible solutions include: > > - Have a per-node "Coordinator Queue" and a MessageConsumer that runs > only on the coordinator node, forwarding messages from the cluster wide > Coordinator Queue to the local node's queue. > > - Write a custom MessageConsumer to be run on nodes that is aware of > whether or not the local node is the coordinator and either processes > messages or not depending on its state. > > - Use the Exclusive Consumer feature of ActiveMQ 4.x to determine the > coordinator, having each node simply be an exclusive consumer. This > would seemingly work, although we lose control over who the coordinator > node is I believe. > > > > Questions: > > - Any of the solutions above stick out as the most/least appropriate? > > - If we used the Exclusive Consumer feature in ActiveMQ: > > - what determines who currently is the consumer? The first exclusive consumer to register with the broker wins being the active consumer. > > - what exactly determines when the consumer changes? > When the active consumer dies, the next exclusive consumer is made the active consumer. > - and is there any way to get notified of a change in that > consumer (assuming the node that just lost that status is alive). > Not yet. But it's a good idea for a new feature. Please submit a request for this feature at our JIRA: http://issues.apache.org/activemq/browse/AMQ > > > Thank you! > > > -- Regards, Hiram