Hello Solace Community,
I have a question regarding the usage of shared subscriptions with an MQTT client.
I found two different prefixes in the documentation and am curious to learn which is used in which case.
I found in the documentation the following hint (see:
) :
Syntax of Shared Subscriptions
A shared subscription has the form:
#share/<ShareName>/<topicFilter>
Where:
ShareName
is the identifier associated with the shared subscription. It may not contain * or >.
topicFilter
is the topic filter.
But inside the MQTT operational behaviour I find this (see on 4.8.2
):
A Shared Subscription’s Topic Filter MUST start with $share/ and MUST contain a ShareName that is at least one character long[MQTT-4.8.2-1]. The ShareName MUST NOT contain the characters “/”, “+” or “#”, but MUST be followed by a “/” character. This “/” character MUST be followed by a Topic Filter[MQTT-4.8.2-2] as described in section 4.7 .
For me it only worked with $share
in the beginning. But I am now unsure if I missunderstood something. Is the first documentation I quoted and linked not relevant for me ? I was under the assumption that I am using Direct Messaging with QoS 0 and MQTT. So the documentation above should also have worked in my opinion.
So is $share
or #share
correct ? Or maybe both ?
Greetings,
Jan-Filip