[rabbitmq-discuss] Message presence notification
Cermak, Marek
Marek.Cermak at Honeywell.com
Thu Feb 23 12:22:02 GMT 2012
Hello Simon,
> -----Original Message-----
> From: rabbitmq-discuss-bounces at lists.rabbitmq.com [mailto:rabbitmq-discuss-
> bounces at lists.rabbitmq.com] On Behalf Of Simon MacMullen
> Sent: Thursday, February 23, 2012 12:23
> Subject: Re: [rabbitmq-discuss] Message presence notification
>
> Hmm, interesting situation.
>
> basic.qos(0) means "no limit" and RabbitMQ will push all the messages at you.
> Unlikely to be what you want.
No, it's not.
>
> I don't think there's a completely beautiful answer to your question.
> You could:
>
> 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?
>
> 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.
>
> 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.
Not good news but thank you anyway.
regards
Marek
>
> Cheers, Simon
>
> On 23/02/12 09:51, Cermak, Marek wrote:
> > Hello everybody,
> >
> > 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?
> >
> > I was thinking about channel.basicQoS(0) but what would I get in that case?
> >
> > Thank you for your help.
> >
> > Marek
> >
> >
> >
> > _______________________________________________
> > rabbitmq-discuss mailing list
> > rabbitmq-discuss at lists.rabbitmq.com
> > https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
>
> --
> Simon MacMullen
> RabbitMQ, VMware
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
More information about the rabbitmq-discuss
mailing list