Search code examples
mqttmosquittoqos

MQTT qos 2 timeout between PUBREC and PUBREL


Is there some timeout mechanism for MQTT between PUBREC and PUBREL in QOS 2?

Or the timeout is same as global keep alive timeout?

Thanks!

Diagram from HiveMQ Diagram from HiveMQ (http://www.hivemq.com/blog/mqtt-essentials-part-6-mqtt-quality-of-service-levels)


Solution

  • For mosquitto the option you are looking for is

    retry_interval

    Taken from the man page

    retry_interval seconds

    The integer number of seconds after a QoS=1 or QoS=2 message has been sent that mosquitto will wait before retrying when no response is received. If unset, defaults to 20 seconds.

    Reloaded on reload signal.