[rabbitmq-discuss] Message presence notification
Marek Majkowski
majek04 at gmail.com
Thu Feb 23 11:21:16 GMT 2012
On Thu, Feb 23, 2012 at 09:51, Cermak, Marek <Marek.Cermak at honeywell.com> wrote:
> in our scenario we use two different connections to rabbitmq server – one is
> using a slow and permanently open link the second is very fast but opens
> only on demand and should be closed once it is not in use.
>
> These two connection we want to use for consuming messages from many (tens,
> hundreds) queues in the following way
>
> 1. open the connection on a slow link and "watch" the queues;
>
> 2. once there is a message in one of the watched queues, the client
> receives a notification (no message) from rabbit;
>
> 3. client opens the fast link, consumes available messages from queues
> and closes the link;
>
> 4. back to #2.
>
> How can we achieve this with AMQP (0.9.1 or 1.0) ? Can we do it with no
> RabbitMQ protocol extension?
Why not just send two messages? One to a real queue, and another
one, with no payload, to a queue called 'notifications'.
In this case, whenever there is a new message coming to 'notifications' queue,
the consumer will know that there should be another, big, message in some
other queue.
Does it make sense?
> I was thinking about channel.basicQoS(0) but what would I get in that case?
Spec says:
http://www.rabbitmq.com/amqp-0-9-1-reference.html#basic.qos
> May be set to zero, meaning "no specific limit", although other
> prefetch limits may still apply.
Cheers,
Marek
More information about the rabbitmq-discuss
mailing list