-
Notifications
You must be signed in to change notification settings - Fork 4k
MQTT: disconnect consumer when queue is deleted #13996
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
Changes from all commits
bf468bd
9eaa220
d91c9d6
610c838
b48ab72
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -126,6 +126,8 @@ delete(Q, _IfUnused, _IfEmpty, ActingUser) -> | |||||
| log_delete(QName, amqqueue:get_exclusive_owner(Q)), | ||||||
| case rabbit_amqqueue:internal_delete(Q, ActingUser) of | ||||||
| ok -> | ||||||
| Pid = amqqueue:get_pid(Q), | ||||||
| delegate:invoke_no_result([Pid], {gen_server, cast, [{queue_event, ?MODULE, {queue_down, QName}}]}), | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we emit an
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as above, in 0.9.1 the channel emits a queue_down event in this case
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Yes, for AMQP 0.9.1 all protocol methods have to go through
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Where exactly is this happening? The fact that the channel handles 'DOWN' monitor messages is a relict from prior to the
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The line you are referencing is not executed when a classic queue got deleted. Instead the classic queue emits an rabbitmq-server/deps/rabbit/src/rabbit_classic_queue.erl Lines 417 to 418 in 8e78c10
|
||||||
| {ok, 0}; | ||||||
| {error, timeout} = Err -> | ||||||
| Err | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When is this code executed, given that the additional
queue_downaction will throw?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. It is executed for non consuming queues, but skipped for consuming ones. I guess the handing of queue_down should be done after sending the ack?