robotframework-mqttlibrary icon indicating copy to clipboard operation
robotframework-mqttlibrary copied to clipboard

Why a sleep is needed after MQTTLibrary.Connect

Open alepinio opened this issue 1 year ago • 0 comments

Hi!

I've found that messages published right after execution of MQTTLibrary.Subscribe get lost. So I've had to come up with this workaround

    MQTTLibrary.Connect      ${host}

    # FIXME
    Sleep    1s

    MQTTLibrary.Subscribe    ${topic}

This way, messages published right after MQTTLibrary.Subscribe can be retrieved with MQTT.Listen, but of course a sleep sucks.

Am I missing something about the library?


PS: maybe client connect isn't blocking enough? The client id is empty in the log messages print by MQTTLibrary.Connect:

mqtt

alepinio avatar Feb 23 '24 14:02 alepinio