Quantcast
Channel: Active questions tagged consumer - Stack Overflow
Viewing all articles
Browse latest Browse all 92

RabbitMQ Consume Messages in Batches and Ack them all at once

$
0
0

I have a RabbitMQ queue in which I post thousands of messages. I need a background Service that will:

  • Retrieve the messages in batches of 100 messages
  • Store those 100 messages in a Database
  • Ack all 100 messages at once
  • Proceed with the next batch of 100 messages

I'm using the RabbitMQ Client to listen for messages, but I don't know how to "batch" them.

Does anyone has a working example on how to get my messagess 100-100 at a time and ACK them all at once after they have been saved in a DB?

Thanx a lot in advance


Viewing all articles
Browse latest Browse all 92

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>