Rig.BrokerConnection behaviour (Reactive Interaction Gateway v3.0.0-alpha.2) View Source
Interface to any publish-subscribe capable broker service.
Link to this section Summary
Link to this section Types
Specs
callback() :: (RigCloudEvents.CloudEvent.t() -> :ok | {:error, any()})
Specs
connection() :: any()
Specs
subscription_id() :: any()
Specs
topic() :: String.t()
Link to this section Callbacks
Specs
publish(connection(), topic(), key :: String.t(), RigCloudEvents.CloudEvent.t()) :: :ok
Specs
subscribe(connection(), topic(), callback()) :: {:ok, subscription_id()} | {:error, any()}
Specs
unsubscribe(subscription_id()) :: :ok