Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[paho-dev] When to send publish acknowledgements

Hi All,
I've had a PR for the v5 golang client that changes the behaviour so that Publish messages are only acknowledged (the puback or pubrec sent) after the associated message handlers have been invoked and returned. I can see a benefit to doing this for the application as you effectively don't need to have incoming message persistence, until you have processed the message if the client dies and reconnects the server should resend any unacked messages. However the spec says in 3.3.4
> The Client MUST NOT delay the sending of any packets other than PUBLISH packets due to having sent Receive Maximum PUBLISH packets without receiving acknowledgements for them [MQTT-3.3.4-8]. The value of Receive Maximum applies only to the current Network Connection.
On the one hand I think this method counts as a delay, on the other I can see the benefit and how can a server determine this behaviour and what impact does it have? If you're on a constrained device with no persistence this is how it would look anyway. Thoughts?
Al Stockdill-Mander
Squad Lead - Network Intelligence - Alchemy
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU

Back to the top