Subscribing/Publishing

As part of the authentication/token generation you will receive a list of topics that you are allowed to access.

...

"topics": [{
    "topic": "s/b/b1te1/bac4a5b4-94a5-11ea-b438-be1dddf8af87/r/e",
    "scope": "read:stream_events",
    "permission": "read"
}, {
    "topic": "s/b/b1te1/bac4a5b4-94a5-11ea-b438-be1dddf8af87/r/status",
    "scope": "read:stream_status",
    "permission": "read"
}, {
    "topic": "s/b/b1te1/bac4a5b4-94a5-11ea-b438-be1dddf8af87/r/p",
    "scope": "read:stream_persons",
    "permission": "read"
}, {
    "topic": "s/x/s-2w5zPiF5wVKiha6gqjWBCr/b/bac4a5b4-94a5-11ea-b438-be1dddf8af87/p/c",
    "scope": "read:stream_persons_catchup",
    "permission": "read"
}, {
    "topic": "s/x/s-2w5zPiF5wVKiha6gqjWBCr/response",
    "scope": "read:response",
    "permission": "read"
}]

...

After connection you should subscribe to the list of topics that have a permission type of 'read' returned from the authentication call. If you are sending/writing data then it is important that you subscribe to the read:response topic as well as this is where any acknowledgements or error messages from the data that you send will be available.

The topics with a scope containing the word catchup are optional. If you subscribe to these channels you will receive the last values that those messages had. For example if you subscribe to the read:stream_persons scope you will receive a message when the persons involved in the fixture change. However you will not receieve a message until that happens. If you subscribe to the read:stream_persons_cacthup topic you will receive (on that topic) the last read:persons message sent before you connected.

Last updated

Was this helpful?