Erste Seite Zurück Weiter Letzte Seite Übersicht Bild
man mosquitto :
In addition to allowing clients to subscribe to specific topics, mosquitto also allows the use of two wildcards (+ and #) in subscriptions.
+ is the wildcard used to match a single level of hierarchy.
For example, for a topic of "a/b/c/d", the following example subscriptions will match:
• a/b/c/d
• +/b/c/d
• a/+/c/d
• a/+/+/d
• +/+/+/+
The following subscriptions will not match:
• a/b/c
• b/+/c/d
• +/+/+
The second wildcard is # and is used to match all subsequent levels of hierarchy. With a topic of "a/b/c/d", the following example subscriptions will match:
• a/b/c/d
• #
• a/#
• a/b/#
• a/b/c/#
• +/b/c/#
The $SYS hierarchy does not match a subscription of "#". If you want to observe the entire $SYS hierarchy, subscribe to $SYS/#.
Note that the wildcards must be only ever used on their own, so a subscription of "a/b+/c" is not valid use of a wildcard.
The # wildcard must only ever be used as the final character of a subscription.