activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From BenD <>
Subject Priorities with a Store and Forward Broker Network
Date Fri, 19 Jun 2009 13:02:47 GMT

I'm using AMQ5.2 without persistence set up in a Store and Forward Broker

I have a queue with multiple consumers attached all with different
selectors.  The idea is a message comes in and the consumer that can best
respond will consume the message.  This way the producer is decoupled from
having to know who to send the message to. In the case of multiple consumers
with overlapping selectors, ties are broken by subscription priorities.

This worked fine in a single amq server environment. However, when we moved
to the network of brokers we ran into a problem.  It appears that the
forwarding listener that sends the message on to another broker is
subscribed with a very low (negative actually) priority.  Since we are using
multicast discovery its a total guess which consumers connect to which
servers and we can end up in the following situation:

Imagine consumer A and B with overlapping selectors and B has a higher
priority.  In single server environment B will always get message X sent by
a producer.  However in a store and forward network, if consumer A is only
listening on server 1 and consumer B is only listening on server 2, when
message X is sent to server 1 it will be handled by consumer A before it has
a chance to be forwarded on to server 2 and therefore is not handled by
consumer B.

Does this sound correct?  Is there something I'm missing (maybe some
configuration property) or is this just "how store and forward works".  We
needed a network of brokers for scalability (we will need to scale to 10k+
connections) but maybe a master/slave network would be better (most of those
connections will be read only on topics)? I would love to find a solution
that doesn't require re-architecting the whole thing.
View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message