[rabbitmq-discuss] Is it possible to get a "push" when number of messages reaches threshold?
videlalvaro at gmail.com
Sun Jun 1 16:18:19 BST 2014
I'd guess this could be attempted using queue length:
http://www.rabbitmq.com/maxlength.html and setting up a separate dead
letter queue for that 5000th message.
On Sun, Jun 1, 2014 at 3:37 PM, Michael Klishin <mklishin at gopivotal.com>
> On 1 June 2014 at 17:34:11, rails (stammailbox at gmail.com) wrote:
> > > 1. What is the best practice to get the number of messages in a
> > queue.
> > I know I can get it via queue.getMessageCount()
> Do a queue.declare (possibly with passive = true), check # of messages
> ready from
> queue.declare-ok. You can also query queue stats using HTTP API.
> > What is the best way if I want to react only when X messages arrive?
> Add a consumer and process deliveries in batches in your own code.
> > 2. And more important - can I get the number of messages in a queue
> > via push?
> There is no such feature in RabbitMQ. You have to periodically check the
> Software Engineer, Pivotal/RabbitMQ
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rabbitmq-discuss