0
votes

I am using the paho-mqtt gem in ruby.
I was wondering if the gem automatically resends (re-publish) the message to the MQTT broker in case PUBACK is not received on client side for some reason, or do I have to do it manually? QOS=1

ex (this is me publishing with QOS=1, and not doing anything else):

client = PahoMqtt::Client.new

client.on_puback do
  puts "PUBACK received"
end

client.connect(@mqtt_server_ip, @mqtt_server_port)
client.publish(topic, message_payload, false, 1)
1

1 Answers

0
votes

I ended up doing it manually using the on_puback callback. The answer is it has to be done manually :)