Closed kimdre closed 6 months ago
of course you may use aiochannel
or asyncio.Queue
for aggregating incoming messages, and then call .ack(multiply=True)
for confirming multiple of messages receives after triggered by some treshold (queue size or time-based delay or all together).
Thanks :)
Hello,
How can I consume messages in bulk from a queue? I would like to consume and write several messages at once to a database in order to reduce the write load on my database when there are many messages in the queue.
At the moment I use the example for asynchronous message processing shown in the docs to insert messages one at a time: https://aio-pika.readthedocs.io/en/latest/quick-start.html#asynchronous-message-processing