I am new to Mosquitto
and MQTT
, I downloaded the Mosquitto
server library but I do not know how to test it.
Is there any way to test the Mosquitto
server?
In separate terminal windows do the following:
Start the broker:
mosquitto
Start the command line subscriber:
mosquitto_sub -v -t 'test/topic'
Publish test message with the command line publisher:
mosquitto_pub -t 'test/topic' -m 'helloWorld'
As well as seeing both the subscriber and publisher connection messages in the broker terminal the following should be printed in the subscriber terminal:
test/topic helloWorld