pubsubclient
pubsubclient copied to clipboard
Message published multiple times
Hi,
I successfully setup pubsubclient to send messages to my remote MQTT broker (RabbitMQ), but when I publish a message it is published multiple times on the broker (RabbitMQ does not support QoS2). I'm using PublishJSON, the content is correctly received by the broker but it is received multiple times. This is the code, topic is a String and object is a JsonObject&:
MQTT::PublishJSON newpub(topic, object);
mqttClient.publish(newpub.set_qos(1));
Any idea why the message is sent multiple times?
Thanks
is that not the expected behaviour of QoS 1? It guarantees that your message arrive, but it can arrive multiple times.