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

How can I see if all messages have been published? #41

Open
drmattoclarkson opened this issue Nov 18, 2021 · 3 comments
Open

How can I see if all messages have been published? #41

drmattoclarkson opened this issue Nov 18, 2021 · 3 comments

Comments

@drmattoclarkson
Copy link

I have some code that publishes some messages then puts the esp8266 to sleep - how can I tell that all messages have been sent and it's safe to sleep?

@HamzaHajeir
Copy link

Hi

I share the same issue, where onPublish callback is further needed for qos levels 1 and 2, however, to checkout the author's opinion, here's a link to the documentation at the time he did remove it:
https://github.com/philbowles/PangolinMQTT/blob/ff68b5ff114d35c5b873da02e9761f91fafda15f/docs/api.md#specific-problems--fixes

@HamzaHajeir
Copy link

I think you can do the following:

  • subscribe to the same topic you've published.
  • If you hear back your message, go sleep.

@HamzaHajeir
Copy link

It's solved in my fork of H4AsyncMQTT, you receive the PacketID for QoS>0 publishes at ::publish(), and receive the ACK'd PacketID onPublish() callback function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants