Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [paho-dev] Is Publish() a blocking call?

Hi Jeff,

Publish is non blocking. You need to use loop_start() or loop_forever() to process the network queue. You can use the return from publish() to check whether the message has been delivered to the broker or not.

Cheers,

Roger

On 1 Mar 2017 6:23 p.m., "Jeffrey Herr" <jeff@xxxxxxxxxxxx> wrote:
All testing indicates Paho Python MQTT client does not block on the Publish() call. 
A loop pushing 500 messages then disconnecting will consistently Publish fewer than 500 messages into the queue. 

Is this expected?  And if so, how do we work around it besides a blind "Sleep" call?

-Jeff

_______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/paho-dev


Back to the top