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

No consumer notification when broker cleanly disconnects #458

Closed
fpagliughi opened this issue Nov 11, 2023 · 4 comments
Closed

No consumer notification when broker cleanly disconnects #458

fpagliughi opened this issue Nov 11, 2023 · 4 comments
Assignees
Labels
bug Confirmed bug fix added A fix has been pushed to the repo and is being tested upstream Problem with upstream library
Milestone

Comments

@fpagliughi
Copy link
Contributor

When a consumer application is receiving messages from a queue, it gets a null/empty message pointer when the client is unexpectedly disconnected from the broker.

But this notification does not arrive if the broker cleanly disconnects from the client by sending a DISCONNECT packet

@fpagliughi fpagliughi added the bug Confirmed bug label Nov 11, 2023
@fpagliughi fpagliughi added this to the v1.3 milestone Nov 11, 2023
@fpagliughi fpagliughi self-assigned this Nov 11, 2023
@fpagliughi
Copy link
Contributor Author

Remember on_connection_lost() is fired when the connection is unexpectedly lost, but it's on_disconnected() that fires on a clean disconnect from the broker.

@fpagliughi fpagliughi added fix added A fix has been pushed to the repo and is being tested upstream Problem with upstream library labels Nov 13, 2023
@fpagliughi
Copy link
Contributor Author

It appears that there is also an upstream issue affecting this...
eclipse-paho/paho.mqtt.c#1419

@fpagliughi fpagliughi modified the milestones: v1.3, v1.4 Nov 19, 2023
@fpagliughi
Copy link
Contributor Author

Pushed this back to v1.4 release to allow the upstream issue to resolve.

@fpagliughi
Copy link
Contributor Author

fpagliughi commented Jul 7, 2024

Found it... the call to start_consuming() was not registering the 'on_disconnected' handler.

The fix is in the v1.4.x branch and will go out with v1.4.1 and v1.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bug fix added A fix has been pushed to the repo and is being tested upstream Problem with upstream library
Projects
None yet
Development

No branches or pull requests

1 participant