Mqtt Toolkit - @octave_mqtt/peek
- :
msg =
peek(obj)
- :
msg =
peek(obj, topic)
Return the most recent message without removing it from the message queue.
Inputs
obj
A previously created octave_mqtt object
topic
Topic value to match.
Outputs
msg
The most recent message.
If no topic is specified, the last message from any topic will be returned, otherwise the last matching the input topic.
Examples
client = mqttclient("tcp://127.0.0.1"); msg = peek(client);