0
votes

I have a vernemq MQTT broker.

I have tried to publish the message via QOS 1 to broker from client-1 and got a PUBACK message from the broker. But this message is not received in subscriber client-2.

How to notify this failure in client-1

1

1 Answers

0
votes

You don't.

There is no end to end delivery notification in MQTT. The QOS levels only cover 1 leg of delivery at a time.

e.g. A publisher publishing at QOS 1 will confirm that the message reaches the broker and no further. But any given client (there could be 0 to n) may have subscribed at QOS 0 so there would be no confirmation of down stream delivery.

If you want end to end delivery you need to build it yourself by including a unique id in the message payload and have any subscribed client reply (normally on a separate topic) that they have received that message.