We've been using the robust channels, but we also use queue.consume() to set up a callback. After this, there is no obvious reason we would need to hold a reference to the queue.
In our application, it seems that one of the queues has always disappeared. I assume that on disconnection, the queue ends getting garbage-collected and removed from the set, as we don't keep any references to it in our code.
Maybe it would be a good idea to revisit whether WeakSet is a good idea here? Or, atleast add a warning to the .consume() documentation.
We've been using the robust channels, but we also use
queue.consume()
to set up a callback. After this, there is no obvious reason we would need to hold a reference to the queue.Then when the connection fails, it tries to restore the queues at: https://github.com/mosquito/aio-pika/blob/master/aio_pika/robust_channel.py#L134-L135
In our application, it seems that one of the queues has always disappeared. I assume that on disconnection, the queue ends getting garbage-collected and removed from the set, as we don't keep any references to it in our code.
Maybe it would be a good idea to revisit whether
WeakSet
is a good idea here? Or, atleast add a warning to the.consume()
documentation.