This commit is contained in:
Thomas Kruse
2026-02-03 22:29:46 +01:00
commit 8fdf5827e4
156 changed files with 23069 additions and 0 deletions

View File

@ -0,0 +1,7 @@
services:
mosquitto:
image: eclipse-mosquitto
ports:
- "1883:1883"
volumes:
- ./mosquitto.conf:/mosquitto/config/mosquitto.conf:ro

47
01-basics/lab08/lab.txt Normal file
View File

@ -0,0 +1,47 @@
= Multi Level Wildcard
Abbonieren Sie einmal alles.
Abbonieren Sie alles, was zu `training` oder `schulung` gehört.
Senden Sie Nachrichten an
- training/mqtt/student
- schulung/mqtt/teilnehmer
- all
Funktioniert alles, wie erwartet?
$ docker run --rm -it --net host eclipse-mosquitto mosquitto_sub \
--topic '#' \
--debug
$ docker run --rm -it --net host eclipse-mosquitto mosquitto_sub \
--topic 'training/#' --topic 'schulung/#' \
--debug
Versand der Testnachrichten:
$ docker run --rm -it --net host eclipse-mosquitto mosquitto_pub \
--topic training/mqtt/student --message "hello: training/mqtt/student"
$ docker run --rm -it --net host eclipse-mosquitto mosquitto_pub \
--topic schulung/mqtt/teilnehmer --message "hello: schulung/mqtt/teilnehmer"
// FIX: nur topic 'all' um zu zeigen das dieses nur bei dem ersten sub erhalten wird
aber nicht bei 'training/#' und 'schulung/#'
$ docker run --rm -it --net host eclipse-mosquitto mosquitto_pub \
--topic all --message "hello: all"
Erhalten Sie auch System-Nachrichten?
Abbonieren Sie explizit alle `$SYS` Topics.
$ docker run --rm -it --net host eclipse-mosquitto mosquitto_sub \
--topic '$SYS/#' \
--debug

View File

@ -0,0 +1,4 @@
listener 1883
allow_anonymous true
# sys_interval 3