Kind of guaranteed messaging with mqtt QoS 0

jesper
jesper Member Posts: 8
edited January 2023 in General Discussions #1

Hello solace community,

i have a mqtt subscriber client that can only work with QoS 0 and non durable queues. Let's say mqtt Client MQ1 subscribes to a/b/c with queue QU1.

On the other hand i want to prevent data loss and have the risk that the mqtt client is not online and the non durable queue QU1 is not there. So if the client MQ1 is not active messages with topic a/b/c will not be published to queue QU1 (=data loss)

We discussed a solution by adding an additional durable queue QD1 with subscription to a/b/c. An internal java client consumes these messages a/b/c, check the existence of the non durable queue QU1 and if the queue exists the java client publishes the message to a different topic a/b/d to queue QU1.


This solution is really not that nice. Is there another setup how to prevent data in this scenario?

Dead message queue?

Best regards

Jens

Answers

  • uherbst
    uherbst Member, Employee Posts: 130 Solace Employee

    Hi Jens,


    short answer: MQTT QoS0 is all about direct messaging - no queues involved. If you want to prevent data loss, you have to change your QoS-0-client.


    Happy to discuss details in a conf call.


    Uli

    (Contact me here: ulrich.herbst@solace.com)