Exchange v0.2.3 Exchange.MessageBus behaviour View Source
Behaviour that a message library adapter must implement in order to communicate with the Exchange
Link to this section Summary
Callbacks
The current process subscribes to event of type key
Sends a message with a topic of event and content of payload
The current process unsubscribes to event of type key
Link to this section Callbacks
Specs
add_listener(key :: String.t()) :: :error | :ok
The current process subscribes to event of type key
Parameters
- key: Atom that represents an event
Specs
Sends a message with a topic of event and content of payload
Parameters
- event: Atom that represents a topic
- payload: Data to send to subscribers
Specs
remove_listener(key :: String.t()) :: :error | :ok
The current process unsubscribes to event of type key
Parameters
- key: Atom that represents an event