-
Notifications
You must be signed in to change notification settings - Fork 0
Stomp Message Format
Real-time messages are sent using the STOMP protocol.
Before reading these docs, familiarize yourself with the STOMP protocol (here)[http://stomp.github.io/stomp-specification-1.2.html]
Backside allows both anonymous and logged in users. To login, send the login and passcode headers. To login anonymously, don't send the login or passcode headers. If you fail to login, an ERROR frame will be sent back.
To subscribe to paths, the SUBSCRIBE method is used. The destination header must be sent and defines the path to listen to.
The initial state will be immediately sent on subscribing. Any updates will then send.
The message is encoded as json, for example, the following gives an example of subscribing to the root of the tree:
SUBSCRIBE
id:sub-0
destination:/
MESSAGE
destination:/
subscription:sub-0
content-length:63
{"key":"/","message":{"foo":{"value":{"bar":{"value":"foo"}}}}}
The SEND frame is used to make writes to the backside datastore. These messages are intercepted by the proxy and written to the store. The destination header gives the key to be update and the message body contains the update.
NOTE: this may need to change! we need to support removes, which would require a different message format:
SEND
destination:/hello/world
content-length:5
stuff
The rest of the protocol, such as unsubscribing, error handling, etc are all in accordance with the STOMP protocol