← Back to team overview

mosquitto-users team mailing list archive

What happens if the broker loses its network connection?

 

Hi all,

I have a question about the behaviour of a python program that publishes
data, but to a broker that lost its network connection after a while. The
loop() function will probably not detect this as it will only detect
changes on the network socket caused by the broker. In this case the broker
could not tell the publisher it lost the connection.

Will the publisher keep sending data, assuming there is a broker? Or will
it detect somehow the broker is gone (TCP does not get an ack)? Will the
publish function block?

Thanks,
Rene