Closed nik736 closed 6 years ago
I would like to .get a message in a specific topic but without blocking if there is no message. So should simply return the message if it is present (for example a retained message) and if not instead of blocking just return nothing.
How would I achieve this with ruby-mqtt?
Thanks
I assume you solved your problem.
But for anyone else finding this issue, you can used queue_empty? to check if there are any messages available.
queue_empty?
I would like to .get a message in a specific topic but without blocking if there is no message. So should simply return the message if it is present (for example a retained message) and if not instead of blocking just return nothing.
How would I achieve this with ruby-mqtt?
Thanks