Skip to content

MQTT consumer should get disconnected when its queue is deleted #13785

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

Open
mkuratczyk opened this issue Apr 24, 2025 · 1 comment
Open

MQTT consumer should get disconnected when its queue is deleted #13785

mkuratczyk opened this issue Apr 24, 2025 · 1 comment
Labels

Comments

@mkuratczyk
Copy link
Contributor

mkuratczyk commented Apr 24, 2025

Describe the bug

Queues are automatically declared for MQTT consumers. Currently we assume they don't get deleted externally (eg. manually by a user) but technically they can be. The consumer should be disconnected in such case, because it has no way of knowing this happened - from its perspective there are simply no messages to consume.

In RabbitMQ 3.11 the consumer was disconnected in such situations because that's what AMQP does. This behaviour changed with native MQTT, which doesn't use AMQP internally.

Reproduction steps

> omq mqtt -r 1
...
2025/04/24 09:47:02 published=1/s consumed=1/s
2025/04/24 09:47:03 published=1/s consumed=1/s
2025/04/24 09:47:04 published=1/s consumed=1/s
2025/04/24 09:47:05 published=1/s consumed=1/s
2025/04/24 09:47:06 published=1/s consumed=1/s
2025/04/24 09:47:07 published=1/s consumed=0/s <---- rabbitmqct delete_queue ...
2025/04/24 09:47:08 published=1/s consumed=0/s
2025/04/24 09:47:09 published=1/s consumed=0/s

Expected behavior

When a queue declared for an MQTT consumer is deleted, the consumer should be disconnected.

Additional context

No response

@mkuratczyk mkuratczyk added the bug label Apr 24, 2025
@ansd
Copy link
Member

ansd commented Apr 24, 2025

@rabbitmq rabbitmq locked as spam and limited conversation to collaborators May 12, 2025
@rabbitmq rabbitmq deleted a comment from vitalerter May 12, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants