Message schema
Learn about the standard formats for messages to be sent between the Messaging Service and a browser.
Subscribe format
Apply this format when you want to subscribe to WebSockets.
- Format
{ "filter":{ "matcher":"string: unique name to define subject eq., pulse, interaction, chat", "criteria":{ "custom props..":"custom values.." } }, "subscribe":{ "id":"string: client id" } }
- Usage example
{ "filter":{ "matcher":"PULSE", "criteria":{ "user":"alex", "workId":"EPIC-2021" } }, "subscribe":{ "id":"1214455234_1" } }
Unsubscribe format
Apply this format when you want to unsubscribe from WebSockets.
- Format
{ "unsubscribe":{ "id":"string: client id" } }
- Usage example
{ "unsubscribe":{ "id":"1214455234_1" } }
Message delivery format
Apply this format when you want to send the message to a subscriber matching the specified criteria. If the subscription criteria does not match the criteria of the sent message, the message is discarded.
- Format
{ "filter":{ "matcher":"string: unique name to define subject eq., pulse, interaction", "criteria":{ "custom props..":"custom values.." } }, "message":"object : message json" }
- Usage example
{ "filter":{ "matcher":"PULSE", "criteria ":{ "user":"alex", "workId":"EPIC-2021" } }, "message":{ "updateById":"[email protected]", "messageId":"Pulse P-1021" } }
Previous topic Architectural overview Next topic Client-side subscriptions