I have a RabbitMQ queue in which I post thousands of messages. I need a background Service that will:
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
You want to use the "prefetch" and "multi ack" features -
This is what you'll do in your code:
true
and use the delivery tag of the 100th message. the RabbitMQ team monitors the rabbitmq-users
mailing list and only sometimes answers questions on StackOverflow. RabbitMQ 团队监控rabbitmq-users
邮件列表,并且有时只回答 StackOverflow 上的问题。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.