Chronik v0.1.1 Chronik.PubSub.Adapters.Registry View Source

This module is an adapter for the PubSub.

It is based on the Registry.

Link to this section Summary

Functions

Broadcast the records to all the subribers

Subscribes the caller to the PubSub

Unregister the process from the Registry

Link to this section Functions

Link to this function broadcast(records) View Source
broadcast(records :: [Chronik.EventRecord]) :: :ok

Broadcast the records to all the subribers.

Link to this function subscribe(opts \\ []) View Source
subscribe(opts :: Keyword.t) :: :ok

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.

Callback implementation for Chronik.PubSub.subscribe/1.

Link to this function unsubscribe() View Source
unsubscribe() :: :ok

Unregister the process from the Registry.