[rabbitmq-discuss] Message presence notification

Simon MacMullen simon at rabbitmq.com
Thu Feb 23 12:36:45 GMT 2012


On 23/02/12 12:22, Cermak, Marek wrote:
> Hello Simon,

Hi!

>> a) Have the slow link poll with (passive?) queue.declare()s. The declare-ok
>> you get back will tell you the number of messages in the queue at the time
>> the declare was received.
>
> What do you mean by _passive_ queue.declare() ? is there a way to not poll in a time loop?

Just with the passive flag set, so that if you make a mistake and 
declare a queue that does not exist then you get an error rather than 
recreating the queue. No big deal.

But yes, this polls.

>> b) Do the same, but using HTTP to the management plugin. You have to use
>> another protocol, which is a pain, but you can poll a ton of queues with one
>> request, so that may be useful.
>
> We want to limit the communication to AMQP.

Understandable.

>> c) Have the slow link consume with qos(1) and acks. Every time it gets a
>> message, it cancels its consumer and rejects the message (with requeue=true).
>> Then the fast link fires up, does its consuming, shuts down again, then the
>> slow link starts its consumer again. The bad news is that the first message
>> always gets its requeued flag set. The good news is, no polling.
>
> We can't change order of messages.

As of 2.7.0+ this will not reorder messages (assuming you only have one 
slow / fast consumer pair per queue; not sure how well this even could 
work if that was not true).

Cheers, Simon

-- 
Simon MacMullen
RabbitMQ, VMware


More information about the rabbitmq-discuss mailing list