activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hiram Chirino" <hi...@hiramchirino.com>
Subject Re: Exclusive consumer question
Date Thu, 08 Jun 2006 18:02:09 GMT
On 6/7/06, Richard Taylor <RicharTa@attachmatewrq.com> 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

Mime
View raw message