npm i
subscriber1-666.js
will receive messages for car/bmw/c-wa666/#
subscriber1-999.js
will receive messages for car/bmw/c-wa666/#
subscriber1-all.js
will receive messages for car/#
You will get examples how MQTT basically works and how Last will testament is working
- Start all 3 subscriber1 666, 999, all
- Execute
3.1.1/publisher1.js
to send a message to different car topics - Execute
3.1.1/publisher2-lwt.js
to see Last will messages example
You will get an example, how QoS 2 is working
- Start
subscriber3-qos.js
andsubscriber3-qos2.js
- Execute
3.1.1/publisher3-qos0.js
, see how message is arrived - Stop
subscriber3-qos0.js
and execute3.1.1/publisher3-qos0.js
again - Start
subscriber3-qos0.js
again and see if missed massage come in? - Stop
subscriber3-qos2.js
and execute3.1.1/publisher3-qos2.js
again - Start
subscriber3-qos2.js
again and see if missed massage come in?
You will get an example, how Retain messages are working
- Start all 3 subscriber1 666, 999, all
- Run
3.1.1/publisher4-retain.js
and see how, message arrived - Stop
subscriber1-999.js
and after 5 seconds start again. See how last message was deliverd
This example demonstrate, how shared topics are working, which is a MQTT 5 function.
- Start
subscriber6-shared1.js
multiple times. (At least two times to understand the function) - Start
5/publisher5-shared.js
and see, how messages are distributed over subscriber
Do whatever you want with the code from this repository.