Reputation: 2195
I'm running Mosquitto command mosquitto_sub
to subscribe to a topic and see the messages published there.
I would like to be able to see the MQTT properties used when someone publishes a message in that topic.
Is there any way?
Thanks
Upvotes: 0
Views: 2110
Reputation: 2195
You can use the format option (-F
) that takes a pattern, for example:
mosquitto_sub -t <topic> -V mqttv5 -F %C
In the example above we are printing the Content type property (%C
).
Don't forget the version option (-V
) using mqttv5
.
You can find more printable properties here: https://mosquitto.org/man/mosquitto_sub-1.html#outputformat (see MQTT related parameters)
Upvotes: 2