/" as a level separator. For instance
foo/barwould translate to NATS subject
foo.bar. But in MQTT,
/foo/bar/is a valid subject, which, if simply translated, would become
.foo.bar., which is NOT a valid NATS Subject.
#matches any number of levels within a topic, which means that a subscription on
foo/#would receive messages on
foo/bar/baz, but also on
foo. This is not the case in NATS where a subscription on
foo.>can receive messages on
foo/bar/baz, but not on
foo. To solve this, NATS Server will create two subscriptions, one on
foo.>and one on
foo. If the MQTT subscription is simply on
#, then a single NATS subscription on
+matches a single level, which means
foo/+can receive message on
foo/baz, but not on
foo. This is the same with NATS subscriptions using the wildcard
foo/+would translate to
foo/bar, server "A" creates a subscription on
foo.bar, which interest is propagated as any other NATS subscription. A publisher connecting anywhere in the cluster and publishing on
foo.barwould cause server "A" to deliver a QoS 0 message to the MQTT subscription.
max_ack_pendingon a given session cannot exceed 65535. Attempting to create a subscription that would bring the total above the limit would result in the server returning a failure code in the SUBACK for this subscription.
#" wildcard, each subscription ending with "
#" will use 2 times the
#may cause the NATS server to create two subscriptions.