-
Notifications
You must be signed in to change notification settings - Fork 61
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
Basic.Cancel sent from the broker is unactionable on user end #116
Comments
Just fell into this trap. My code follows pretty much aio-pika's asynchronous consumer example. When it gets a Basic.Cancel frame for its consume queue, it stops receiving messages without any warning. Ideally, I'd like to restart the service but have no way of telling when this happens. Maybe we can simply forward the "message" to the consume callback by changing Line 425 in eb1ebe5
should_add_to_rpc=True ? However, that will likely be a breaking change.
I could also see an optional, specific UpdateFor now I work around that with async polling on the channel's consumer list:
|
When the server sends a
Basic.Cancel
notification, aiormq simply removes the consumer tag from its consumer list.This leaves the end-user of the lib with no way of knowing it'll not receive messages any more, although the server explicitly said so.
Shouldn't we expose this notification to the end user? That way the end user can react to this and stop listening.
The text was updated successfully, but these errors were encountered: