Chronik v0.1.10 Chronik.PubSub behaviour View Source
Chronik.PubSub
adapter contract and API.
In Chronik
there is only one feed (all). This means that subscribers
see a total ordering of events.
Link to this section Summary
Types
The result status of all operations on the Chronik.PubSub
Callbacks
Broadcasts an enumeration of records
to all the subscribers
Subscribes the caller to the PubSub
Unsubscribes the caller from the PubSub. No further events are received from the PubSub
Link to this section Types
The result status of all operations on the Chronik.PubSub
Link to this section Functions
Link to this section Callbacks
broadcast(records :: [Chronik.EventRecord]) :: result_status()
Broadcasts an enumeration of records
to all the subscribers.
Subscribes the caller to the PubSub.
Multiple subscriptions to the PubSub are allowed. The subscriber will receive the events multiple times.
The accepted options are:
consistency
::eventual
(default) or:strict
Unsubscribes the caller from the PubSub. No further events are received from the PubSub.
note: events could still be on the subscribers’ mailbox.