Can Mqtt broker forward messages which have not been sent to any client ?


If a client has been connected and subscribed to a topic (at QOS 1 or 2) then disconnects the broker will queue messages to that topic until the client reconnects (as long as it sets the cleanSession flag to false when it reconnects) and uses the a fixed clientID

There is also the concept of retained messages. This is a flag that can be set on a message when published that means that the broker will remember the last message (retained) on a given topic and deliver this message to any client that subscribes to that topic before any other messages. It is just one message, not any other history.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.