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

Programmatically way to determine if paho-mqtt processes queue is empty? #865

Open
Jibun-no-Kage opened this issue Oct 22, 2024 · 2 comments
Labels
Status: Available No one has claimed responsibility for resolving this issue.

Comments

@Jibun-no-Kage
Copy link

Programmatically way to determine if paho-mqtt processes queue completed? For example, if I call client.disconnect(), the on_disconnect call back may need a bit more time to complete, is there a way I can test for this?

@github-actions github-actions bot added the Status: Available No one has claimed responsibility for resolving this issue. label Oct 22, 2024
@PierreF
Copy link
Contributor

PierreF commented Mar 4, 2025

Hi,

no I don't think there is such feature currently. I agree it seems a valuable feature.

Depending on your use-case you might track per-message with wait_for_publish, or if the number of message is too large just using on_publish callback (like count number of published message, if it match number of emitted message, the queue is empty).

@Jibun-no-Kage
Copy link
Author

Yes... using on_publish method would seem to be possible in my use case. Is there a process to request such a feature be added? Seems straight-forward to add a small property or method to just report the queue length?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Available No one has claimed responsibility for resolving this issue.
Projects
None yet
Development

No branches or pull requests

2 participants