PhoenixPubsubNats (phoenix_pubsub_nats v0.2.3)

View Source

Phoenix PubSub adapter based on Nats.

An example usage (add this to your supervision tree):

{
    Phoenix.PubSub,
    name: Phoenix.PubSubTest,
    adapter: PhoenixPubsubNats,
    connection: %{host: '127.0.0.1', port: 4222}
  }

where connection is configured separately based on the gnat documentation.

Optional parameters:

  • serializer: Used to convert messages to/from the underlying Nats system.
              This library provides two implementations of the `Nats.Serializer`
              serialization module, namely:
              * `Nats.Serializer.Native`: Convert messages using Erlang's native serialization mechanism.
              * `Nats.Serializer.Json`: Convert messages using Json format.

Summary

Functions

Returns a specification to start this module under a supervisor.

Functions

child_spec(init_arg)

(since 0.1.0)

Returns a specification to start this module under a supervisor.

See Supervisor.

start_link(opts)

(since 0.1.0)