Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RobustChannel may fail to restore queues due to WeakSet #594

Open
Dreamsorcerer opened this issue Oct 24, 2023 · 0 comments
Open

RobustChannel may fail to restore queues due to WeakSet #594

Dreamsorcerer opened this issue Oct 24, 2023 · 0 comments

Comments

@Dreamsorcerer
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant