Add labs
This commit is contained in:
7
04-mosquitto/lab09/docker-compose.yml
Normal file
7
04-mosquitto/lab09/docker-compose.yml
Normal file
@ -0,0 +1,7 @@
|
||||
services:
|
||||
mosquitto:
|
||||
image: eclipse-mosquitto
|
||||
ports:
|
||||
- "1883:1883"
|
||||
volumes:
|
||||
- ./mosquitto.conf:/mosquitto/config/mosquitto.conf:ro
|
||||
37
04-mosquitto/lab09/lab.txt
Normal file
37
04-mosquitto/lab09/lab.txt
Normal file
@ -0,0 +1,37 @@
|
||||
= Unidirektionale Mosquitto Bridge (lab09)
|
||||
|
||||
|
||||
Konfigurieren Sie eine Bridge zu `test.mosquitto.org` für eingehende Nachrichten.
|
||||
Verwenden Sie eine feste `remote_clientid`, z.B. training-studentXX.
|
||||
|
||||
listener 1883
|
||||
listener_allow_anonymous true
|
||||
|
||||
connection mosquitto-bridge
|
||||
address test.mosquitto.org:1883
|
||||
remote_clientid training-demo
|
||||
|
||||
|
||||
Das Remote-Topic `$SYS/broker/clients/total` soll auf `remote/clients/total` gemappt werden.
|
||||
Die Hierarchie `$SYS/broker` soll auf `remote/broker` gemappt werden
|
||||
|
||||
|
||||
topic clients/total in 1 remote/ $SYS/broker/
|
||||
topic # in 1 remote/broker/ $SYS/broker/
|
||||
|
||||
|
||||
$ docker run --rm -it --init --net host -v $PWD:/mosquitto/config eclipse-mosquitto
|
||||
|
||||
|
||||
Validieren Sie den Status der Bridge und dass Nachrichten ankommen
|
||||
|
||||
$ docker run --rm -it --init --net host eclipse-mosquitto \
|
||||
mosquitto_sub --topic '$SYS/broker/connection/#' --topic '#' --debug
|
||||
|
||||
Testen Sie per Bridge alle Topics zu subscriben, nehmen Sie die Konfiguration wieder heraus und starten Mosquitto neu
|
||||
|
||||
|
||||
topic # in 1 full/ ""
|
||||
|
||||
|
||||
Beheben Sie ein mögliches Problem
|
||||
12
04-mosquitto/lab09/mosquitto.conf
Normal file
12
04-mosquitto/lab09/mosquitto.conf
Normal file
@ -0,0 +1,12 @@
|
||||
listener 1883
|
||||
listener_allow_anonymous true
|
||||
|
||||
connection mosquitto-bridge
|
||||
address test.mosquitto.org:1883
|
||||
remote_clientid training-demo
|
||||
|
||||
topic clients/total in 1 remote/ $SYS/broker/
|
||||
topic # in 1 remote/broker/ $SYS/broker/
|
||||
|
||||
#topic # in 1 full/ ""
|
||||
#cleansession true
|
||||
Reference in New Issue
Block a user