[rabbitmq-discuss] Broadcasting and STOMP (was Re: python stomp examples)

Ben Hood 0x6e6562 at gmail.com
Wed Sep 10 11:22:30 BST 2008


On Wed, Sep 10, 2008 at 10:22 AM, Novak Joe
<joes.mailing.lists at gmail.com> wrote:
>> In contrast, when messages leave a queue for a consumer, they are not
>> duplicated. One message, sitting on a queue, is delivered to only one of
>> the available consumers. Only if that consumer rejects the message
>> somehow (e.g. by crashing or otherwise disconnecting before it
>> acknowledges the message) will the message be sent on by the queue to
>> some other consumer.
> Is this round-robin functionality predictable in terms of the order in
> which a set of consumers subscribed to a single queue will be
> notified?  That is, if I have 5 consumers subscribed to one queue,
> (A,B,C,D,E) and my producer sends a message which makes its way to the
> queue, how does rabbitmq determine which of those 5 consumers should
> receive the message?  If message 234 is sent and A rejects, then B
> accepts it, will the next message 235 first be sent to consumer C?  Or
> is this just kind of random?

Tony described it as being round-robin-ish, meaning that it's
round-robin on average but not every message is guaranteed to be sent
in a strictly round-robin fashion.

> Thanks for this link, although maybe I should have looked harder for
> the spec myself.  Instead I fruitlessly searched about the rabbitmq
> site for 'fanout' and 'topic'.

There are a few questions about direct, fanout and topic exchanges in
the FAQ on the dev wiki:

>> The STOMP gateway doesn't provide a way of creating a new exchange, yet;
>> you have to use a real AMQP client (one that can issue
>> "exchange.declare" commands) for that, currently. Suggestions welcome!
> Hmm.  From the AMQP spec it looks like I can create a 'durable'
> exchange, which means that there shouldn't be any obstacle to creating
> a hybrid producer client, right?  I am working primarily with python,
> so I'm thinking I can use stomper+py-amqplib or python-qpid
> (http://barryp.org/software/py-amqplib/) then just use amqp module to
> add the exchange and do all my message passing with STOMP.

Sounds reasonable.



More information about the rabbitmq-discuss mailing list