Solace Message Format Topics
Solace Message Format (SMF) is the underlying messaging protocol for SAP Integration Suite, advanced event mesh.
SMF topics have the following properties:
- Consist of NULL-terminated UTF-8 strings composed of one or more levels in the format:
a/b/c
. - The
/
character is used as a separator between levels - which are also referred to as elements - of the string. - A maximum of 128 topic levels are supported.
- The maximum length of a string, excluding the
NULL
terminator, is 250 bytes. - Characters in topic strings are case-sensitive. For example, the topic subscription
animals/domestic/cats
is not equal toAnimals/Domestic/Cats
. - All UTF-8 characters are supported. However, the following characters have special meaning:
- For topic subscriptions:
/
is a level separator.<NULL>
is an invalid character.*
is a single-level wildcard.>
can be used as a wildcard, and is a multi-level wildcard when used at the last level of a topic subscription.- A leading
!
, as for example in!a/b/c
, in queue topic subscriptions indicates a subscription exception. - For publishing topics:
/
is a level separator.<NULL>
is an invalid character.-
*
is treated as a literal character. Do not use this character when creating topics. >
is treated as a literal character. Do not use this character when creating topics.- A leading
!
is treated as a literal character. Do not use this character when creating topics.
MQTT Topic Compatibility
To allow compatibility with MQTT topics, which permit empty topic levels (for example, /a/b
, a//b
, or a/b/
), advanced event mesh also allows empty topic levels in SMF topics. However, using empty topic levels in SMF topics has some limitations:
- Client applications using the SAP Messaging APIs for C, .NET, Go, Java RTO, and Python:
- can publish to topics with empty levels
- cannot use topic subscriptions with empty levels
- Client applications using the SAP Messaging APIs for Java, JCSMP, JMS, JavaScript, and Node.js:
- cannot publish to topics with empty levels
- cannot use topic subscriptions with empty levels
- In ACL profiles, SMF topic exceptions cannot have empty topic levels for publishing or subscribing.
The event broker automatically creates a topic subscription beginning with the prefix #P2P/
for each client, which allows messages to be sent directly to that client (for example, in request/reply scenarios). However, the leading "#" in #P2P
is not valid MQTT syntax. Therefore, to make use of these special SAP subscriptions, MQTT clients can use the string _P2P
instead of #P2P
. The event broker considers these two strings to be equivalent.