Subscribing to Message Bus Events
To receive event messages published on the event broker message bus, an application must connect to the Message VPN where the event occurs and subscribe to the associated event topic.
This section covers the following event topic subscriptions:
- System Event Topics
- Message VPN Event Topics
- Client Event Topics
- Subscribe Event Topics
- Unsubscribe Event Topics
Standard Event Message Summary
The table below summarizes the standard event message topics and texts for each type of standard event message.
Event Type | Topic | Message Text |
---|---|---|
System |
#LOG/<level>/SYSTEM/<routerName>/<eventName> $SYS/LOG/<level>/SYSTEM/<routerName>/<eventName> |
SYSTEM: eventName: - - descriptiveText |
Message-VPN |
#LOG/<level>/VPN/<routerName>/<eventName>/<vpnName> $SYS/LOG/<level>/VPN/<routerName>/<eventName>/<vpnName> |
VPN: eventName: vpnName - descriptiveText |
Client |
#LOG/<level>/CLIENT/<routerName>/<eventName>/<vpnName>/<ClientName> $SYS/LOG/<level>/CLIENT/<routerName>/<eventName>/<vpnName>/<ClientName> |
CLIENT: eventName: vpnName ClientName descriptiveText |
Subscribe Version 1 (V1) |
#LOG/INFO/SUB_ADD/<subscribedTopic> $SYS/LOG/INFO/SUB_ADD/<subscribedTopic> |
routerName vpnName clientName SUBSCRIPTION_ADD subscribedTopic clientUsername clientAddr subMgrClientName subMgrUsername subMgrAddr |
Unsubscribe Version 1 (V1) |
#LOG/INFO/SUB_DEL/<subscribedTopic> $SYS/LOG/INFO/SUB_DEL/<subscribedTopic> |
routerName vpnName clientName SUBSCRIPTION_DELETE subscribedTopic clientUsername clientAddr subMgrClientName subMgrUsername subMgrAddr |
Subscribe Version 2 (V2) |
#LOG/INFO/SUB/<routerName>/ADD/<vpnName>/<clientName>/<subscribedTopic> $SYS/LOG/INFO/SUB/<routerName>/ADD/<vpnName>/<clientName>/<subscribedTopic> |
routerName vpnName clientName SUBSCRIPTION_ADD subscribedTopic clientUsername clientAddr subMgrClientName subMgrUsername subMgrAddr |
Unsubscribe Version 2 (V2) |
#LOG/INFO/SUB/<routerName>/DEL/<vpnName>/<clientName>/<subscribedTopic> $SYS/LOG/INFO/SUB/<routerName>/DEL/<vpnName>/<clientName>/<subscribedTopic> |
routerName vpnName clientName SUBSCRIPTION_DELETE subscribedTopic clientUsername clientAddr subMgrClientName subMgrUsername subMgrAddr |
- An application can receive all published events on a Message VPN by subscribing to:
#LOG/>
, when events are published using SMF topic syntax
or
, when events are published using MQTT topic syntax
$SYS/LOG/#Note that subscriptions to event message topics are a direct topic match. For example, an application subscribing to
#LOG/WARNING/>
receives event messages for the WARNING level only, not ones of higher or lower level severity. - An application can receive all subscribe and unsubscribe events on a Message VPN, but not receive any other event messages, by subscribing to:
#LOG/INFO/SUB*/>
, when events are published using SMF topic syntax
or$SYS/LOG/INFO/SUB_ADD/#
and$SYS/LOG/INFO/SUB_DELETE/#
, when events are published using MQTT topic syntax - All event broker event logs and all published events, except for subscribe and unsubscribe events, include a timestamp in ISO 8601 format.
System Event Topics
To receive system scope events from the event broker message bus when events are published using SMF topic syntax, subscribe to:
#LOG/<level>/SYSTEM/<routerName>/<eventName>
To receive system scope events from the event broker message bus when events are published using MQTT topic syntax, subscribe to:
$SYS/LOG
/<level>/SYSTEM/<routerName>/<eventName>
Where:
<level>
is the message event severity level: crit, err, warning, notice, or info. Refer to Monitoring Events Using Syslog for details.
<routerName>
is the name of the event broker where the event occurred.
<eventName>
is the name of the event message as listed and described in Syslog Event Reference.
Example:
#LOG/INFO/SYSTEM/rtr215/SYSTEM_CHASSIS_FAN_HIGH
Both the event log text, and the published message text, are formatted as follows:
timestamp level routerName SYSTEM: eventName: - - descriptiveText
Example:
2008-05-24T09:40:41-0400 <local3.info> rtr215 SYSTEM: SYSTEM_CHASSIS_FAN_HIGH: - - Fan 1 speed high threshold exceeded
To receive all system scope events from the event broker message bus when events are published using SMF topic syntax, subscribe to:
#LOG/*/SYSTEM/>
To receive all system scope events from a particular event broker when events are published using SMF topic syntax, subscribe to:
#LOG/*/SYSTEM/<routerName>/>
To receive all system scope events from the event broker message bus when events are published using MQTT topic syntax, subscribe to:
$SYS/LOG
/+/SYSTEM/#
To receive all system scope events from a particular event broker when events are published using MQTT topic syntax, subscribe to:
$SYS/LOG
/+/SYSTEM/<routerName>/#
Message VPN Event Topics
Message VPN events will be published according to the topic formats (SMF or MQTT) selected for event publishing. Refer to Setting a Topic Format for Published Events for more information.
To receive Message VPN scope events published using SMF topic syntax from the event broker message bus, subscribe to:
#LOG/<level>/VPN/<routerName>/<eventName>/<vpnName>
To receive Message VPN scope events published using MQTT topic syntax from the event broker message bus, subscribe to:
$SYS/LOG/<level>/VPN/<routerName>/<eventName>/<vpnName>
Where:
<level>
is the message event severity level: crit, err, warning, notice, or info. Refer to Monitoring Events Using Syslog for details.
<routerName>
is the name of the event broker where the event occurred.
<eventName>
is the name of the event message as listed and described in the Syslog Event Reference.
<vpnName>
is the name of the Message VPN where the event occurred
Example:
#LOG/INFO/VPN/rtr215/VPN_VPN_EG_MSG_RATE_HIGH/blue
Both the event log text, and the published message text, are formatted as follows:
timestamp level routerName VPN: eventName: vpnName - descriptiveText
Example:
2008-05-24T09:40:41-0400 <local3.info> rtr215 VPN: MSG_RATE: blue - Maximum message rate threshold exceeded
To receive all Message VPN scope events published using SMF topic syntax from the event broker message bus, for the Message VPN to which the client is connected, subscribe to:
#LOG/*/VPN/>
To receive all Message VPN scope events published using SMF topic syntax from a particular event broker, for the Message VPN to which the client is connected, subscribe to:
#LOG/*/VPN/<routerName>/>
To receive all Message VPN scope events published using MQTT topic syntax from the event broker message bus, for the Message VPN to which the client is connected, subscribe to:
$SYS/LOG/+/VPN/#
To receive all Message VPN scope events published using MQTT topic syntax from a particular event broker, for the Message VPN to which the client is connected, subscribe to:
$SYS/LOG/+/VPN/<routerName>/#
Client Event Topics
To receive client scope events published using SMF topic syntax from the event broker message bus, on a per‑client basis, subscribe to:
#LOG/<level>/CLIENT/<routerName>/<eventName>/<vpnName>/<clientName>
To receive client scope events published using MQTT topic syntax from the event broker message bus, on a per‑client basis, subscribe to:
$SYS/LOG/<level>/CLIENT/<routerName>/<eventName>/<vpnName>/<clientName>
Where:
<level>
is the message event severity level: crit, err, warning, notice, or info. Refer to Monitoring Events Using Syslog for details.
<routerName>
is the name of the event broker where the event occurred.
<eventName>
is the name of the event message as listed and described in the Syslog Event Reference.
<vpnName>
is the name of the associated Message VPN where the event occurred.
<clientName>
is the name of the associated client where the event occurred.
Example:
#LOG/INFO/CLIENT/rtr215/CLIENT_CLIENT_EGRESS_MSG_DISCARD/blue/host83/12401/#0001
Both the event log text, and the published message text, are formatted as follows:
timestamp routerName CLIENT: eventName: vpnName clientName descriptiveText
Example:
2008-05-24T09:40:41-0400 <local3.info> rtr215 CLIENT: DISCARD_INDICATION: blue host83/12401/#0001 Egress message(s) discarded
To receive all client scope events published using SMF topic syntax from the event broker message bus, for the Message VPN to which the client is connected, subscribe to:
#LOG/*/CLIENT/>
To receive all client scope events published using SMF topic syntax from a particular event broker for the Message VPN to which the client is connected, subscribe to:
#LOG/*/CLIENT/<routerName>/>
To receive all client scope events published using MQTT topic syntax from the event broker message bus, for the Message VPN to which the client is connected, subscribe to:
$SYS
/+/CLIENT/#
To receive all client scope events published using MQTT topic syntax from a particular event broker for the Message VPN to which the client is connected, subscribe to:
$SYS
/+/CLIENT/<routerName>/#
Subscribe Event Topics
Subscribe events are published using SMF topic syntax to the following topic on the Message VPN where the subscription was added:
V1: #LOG/INFO/SUB_ADD/<subscribedTopic>
V2: #LOG/INFO/SUB/<routerName>/ADD/<vpnName>/<clientName>/<subscribedTopic>
Subscribe events are published using MQTT topic syntax to the following topic on the Message VPN where the subscription was added:
V1: $SYS/LOG/INFO/SUB_ADD/<subscribedTopic>
V2: $SYS/LOG/INFO/SUB/<routerName>/ADD/<vpnName>/<clientName>/<subscribedTopic>
Where:
<subscribedTopic>
is the associated subscription topic string. Note that if the subscription topic string is greater than 235 bytes, it will be truncated in the published topic.
<routerName>
is the name of the event broker where the event occurred.
<vpnName>
is the name of the associated Message VPN where the event occurred.
<clientName>
is the name of the associated client where the event occurred. If using V2, and the length of the generated event topic including the <clientName>
string is greater than 235 bytes (and truncating the <subscribedTopic>
string would continue to exceed the 235 byte limit) the <subscribedTopic>
string is omitted and the <clientName>
string is truncated.
To minimize the performance impact of publishing subscribe events, a timestamp is not included in the message text.
Subscribe topic example using V1:
#LOG/INFO/SUB_ADD/animals/dogs
The published message text is formatted as follows:
routerName vpnName clientName SUBSCRIPTION_ADD subscribedTopic clientUsername clientAddr subMgrClientName subMgrUsername subMgrAddr
Subscribe message text example:
rtr215 blue host83/12401/#0001 SUBSCRIPTION_ADD animals/dogs default 192.0.0.XX:10001 host92/1201/#0019 admin 192.0.0.XX:10019
In this example, client name host83/12401/#0001
has a new subscription animal/dogs
added from the subscription manager host92/1201/#0019
:
Subscribe topic example using V2:
#LOG/INFO/SUB/rtr2015/ADD/blue/host83/12401/#0001/animals/dogs
The published message text is formatted as follows:
routerName vpnName clientName SUBSCRIPTION_ADD subscribedTopic clientUsername clientAddr subMgrClientName subMgrUsername subMgrAddr
Subscribe message text example:
rtr215 blue host83/12401/#0001 SUBSCRIPTION_ADD animals/dogs default 192.0.0.XX:10001 host92/1201/#0019 admin 192.0.0.XX:10019
In this example, client name host83/12401/#0001
has a new subscription animal/dogs
added from the subscription manager host92/1201/#0019
:
The subMgrClientName
, subMgrUsername
, and subMgrAddr
are optional fields and apply only if the subscription is made via a subscription manager. If a subscription manager is not used, the message body contains three trailing spaces that separate three empty fields.
Unsubscribe Event Topics
Unsubscribe events are published using SMF topic syntax to the following topic, on the Message VPN where the subscription was removed:
V1: #LOG/INFO/SUB_DEL/<subscribedTopic>
V2: #LOG/INFO/SUB/<routerName>/DEL/<vpnName>/<clientName>/<subscribedTopic>
Unsubscribe events are published using MQTT topic syntax to the following topic, on the Message VPN where the subscription was removed:
V1: $SYS/LOG/INFO/SUB_DEL/<subscribedTopic>
V2: $SYS/LOG/INFO/SUB/<routerName>/DEL/<vpnName>/<clientName>/<subscribedTopic>
Where:
<subscribedTopic>
is the associated subscription topic string. Note that if the subscription topic string is greater than 235 bytes, it will be truncated in the published topic.
<routerName>
is the name of the event broker where the event occurred.
<vpnName>
is the name of the associated Message VPN where the event occurred.
<clientName>
is the name of the associated client where the event occurred. If using V2, and the length of the generated event topic including the <clientName>
string is greater than 235 bytes (and truncating the <subscribedTopic>
string would continue to exceed the 235 byte limit) the <subscribedTopic>
string is omitted and the <clientName>
string is truncated.
To minimize the performance impact of publishing subscribe events, a timestamp is not included in the message text.
Unsubscribe topic example using V1:
#LOG/INFO/SUB_DEL/animals/dogs
The published message text is formatted as follows.
routerName vpnName clientName SUBSCRIPTION_DELETE subscribedTopic clientUsername clientAddr subMgrClientName subMgrUsername subMgrAddr
Unsubscribe message text example:
rtr215 blue host83/12401/#0001 SUBSCRIPTION_DELETE animals/dogs default 192.0.0.XX:10001 host92/1201/#0019 admin 192.0.0.92:10019
In this example, client name host83/12401/#0001
has a subscription animals/dogs
removed from subscription manager host92/1201/#0019
:
Unsubscribe topic example using V2:
#LOG/INFO/SUB/rtr215/DEL/blue/host83/12401/#0001/animals/dogs
The published message text is formatted as follows.
routerName vpnName clientName SUBSCRIPTION_DELETE subscribedTopic clientUsername clientAddr subMgrClientName subMgrUsername subMgrAddr
Unsubscribe message text example:
rtr215 blue host83/12401/#0001 SUBSCRIPTION_DELETE animals/dogs default 192.0.0.XX:10001 host92/1201/#0019 admin 192.0.0.92:10019
In this example, client name host83/12401/#0001
has a subscription animals/dogs
removed from subscription manager host92/1201/#0019
:
The subMgrClientName
, subMgrUsername
, and subMgrAddr
are optional fields and apply only if the subscription is made via a subscription manager. If a subscription manager is not used, the message body contains three trailing spaces that separate three empty fields.