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 Cermak, Marek :: Rate this Message:

| View in Thread

Hello Marek,

> -----Original Message-----
> From: Marek Majkowski [mailto:majek04@...]
> Sent: Thursday, February 23, 2012 12:21
> Subject: Re: [rabbitmq-discuss] Message presence notification
>
> 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?
>

It indeed does, but it would be useful in case there is only one producer (or not many of them). We can have lot of producers and that would bring tons of messages in notification queue (in the worst case one for every message in the 'real' queue).
Another issue would be sending of such notification messages since producers are not willing to be changed ;-)


> > 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.
>

True, you're right.


> Cheers,
>     Marek

Thanks.

Regards
Marek
_______________________________________________
rabbitmq-discuss mailing list
rabbitmq-discuss@...
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss

 « Return to Thread: Message presence notification