How to display delivered and read receipts in MQTT broker Mosquitto?

后端 未结 2 1350
名媛妹妹
名媛妹妹 2020-12-10 23:21

I want to display delivered and read receipts to users in my messaging platform. I am using Eclipse\'s Paho library with Mosquitto as the broker. Since Mosquitto does not st

2条回答
  •  天命终不由人
    2020-12-11 00:02

    The quick answers to your questions:

    1. High QOS (1/2) is not end to end delivery confirmation, it is only confirmation between the broker and a client. e.g. a publisher publishing at QOS 2 the confirmation is only between the publisher and the broker, not then onward to the subscriber (who may be subscribed at a different QOS anyway). The only way to do this is to send a separate message from the receiving end back to the sender. Also there may be more than one subscriber to any given topic, so you have to think how this would work.

    2. Again, the only way to do this is with a separate message sent when the message is read

    3. You will have to implement this yourself. The only thing that may help is something like the built in support for storing messages in a database present in some brokers (this is not part of the spec, so totally propitiatory to the implementation) e.g. hivemq

提交回复
热议问题