Commanded.PubSub.LocalPubSub (Commanded v1.3.1) View Source

Local pub/sub adapter, restricted to a single node, using Elixir's Registry.

You can configure this adapter in your environment config file:

# `config/config.exs`
config :my_app, MyApp.Application, pubsub: :local

This adapter will be used by default when none is specified in config.

Link to this section Summary

Functions

Broadcasts message on given topic.

Start a Registry for local pub/sub.

List tracked terms and associated PIDs for a given topic.

Subscribes the caller to the topic.

Track the current process under the given topic, uniquely identified by key.

Link to this section Functions

Link to this function

broadcast(adapter_meta, topic, message)

View Source

Broadcasts message on given topic.

Link to this function

child_spec(application, config)

View Source

Start a Registry for local pub/sub.

Link to this function

list(adapter_meta, topic)

View Source

List tracked terms and associated PIDs for a given topic.

Link to this function

subscribe(adapter_meta, topic)

View Source

Subscribes the caller to the topic.

Link to this function

track(adapter_meta, topic, key)

View Source

Track the current process under the given topic, uniquely identified by key.