mosquitto-users team mailing list archive
-
mosquitto-users team
-
Mailing list archive
-
Message #00168
Re: python daemon - on_message callback not fired
Dear Alexander,
> My problem is that on_message will not get hit.
You aren't calling the network processing loop anywhere so only
outgoing communication will happen. You should use loop()
periodically, loop_start() once to run the network loop in a thread in
the background, or loop_forever() to call the network loop in a
blocking call. I guess that the latter is what you want without
knowing the details of the daemon module:
def run():
print('Entering running state...')
Client.mc.loop_forever()
Cheers,
Roger
Follow ups
References