WARNING: This server is unstable and will be retired in the next days. If you want to keep this forum available, please request immediately a migration on the Nabble Support forum. Forums that don't receive any migration request will be deleted forever.

 « Return to Thread: Message presence notification

Re: Message presence notification

by Marek Majkowski :: Rate this Message:

| View in Thread

On Thu, Feb 23, 2012 at 09:51, Cermak, Marek <Marek.Cermak@...> 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
_______________________________________________
rabbitmq-discuss mailing list
rabbitmq-discuss@...
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss

 « Return to Thread: Message presence notification