Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why a sleep is needed after MQTTLibrary.Connect #33

Open
alepinio opened this issue Feb 23, 2024 · 0 comments
Open

Why a sleep is needed after MQTTLibrary.Connect #33

alepinio opened this issue Feb 23, 2024 · 0 comments

Comments

@alepinio
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant