Chronik v0.1.2 Chronik.PubSub behaviour View Source
PubSub adapter contract.
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 pub_sub
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. Note: events could still be on the mailbox
Link to this section Types
The result status of all operations on the pub_sub
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 mailbox.