kidcapital
kidcapital

Reputation: 5174

How to have Bunny process one message at a time with RabbitMQ?

When I use Bunny, when I open a connection to a queue that has 50,000 messages using:

queue = channel.queue('test.queue', :durable => true)
queue.subscribe(:manual_ack => true) do ...

RabbitMQ moves ALL the messages from READY to UNACKED immediately, thus leaving none in READY.

If I try to spin up another Bunny using the same code, it now has nothing to read off READY.

Am I missing something obvious?

Upvotes: 0

Views: 291

Answers (1)

kidcapital
kidcapital

Reputation: 5174

Figured it out. I didn't set pre_fetch.

Upvotes: 5

Related Questions