0

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

italktothewind
  • 1,950
  • 2
  • 28
  • 55

1 Answers1

1

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)

italktothewind
  • 1,950
  • 2
  • 28
  • 55