we start a background task consuming all the messages we can get
in __anext__, we pop one item from the queue if there is one
If messages are incoming at a faster rate than they're being consumed from the iterator, won't messages pile up in memory, potentially consuming a lot of RAM? Or am I misunderstanding something?
I looked at how
QueueIterator
is implemented and I have a question: https://github.com/mosquito/aio-pika/blob/master/aio_pika/queue.py#L389This is how it works, as I understand it:
__anext__
, we pop one item from the queue if there is oneIf messages are incoming at a faster rate than they're being consumed from the iterator, won't messages pile up in memory, potentially consuming a lot of RAM? Or am I misunderstanding something?