Mississippi.Producer.EventsProducer (Mississippi v1.0.0)

View Source

The entry point for publishing messages on Mississippi.

Summary

Functions

Returns a specification to start this module under a supervisor.

Publish a message on Mississippi AMQP queues. The call is blocking, as only one message at a time can be published.

Types

publish_opts()

@type publish_opts() :: [
  sharding_key: term(),
  headers: keyword() | map(),
  message_id: binary(),
  timestamp: integer()
]

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

publish(payload, opts)

@spec publish(payload :: binary(), opts :: publish_opts()) ::
  :ok | {:error, :reconnecting} | AMQP.Basic.error()

Publish a message on Mississippi AMQP queues. The call is blocking, as only one message at a time can be published.

start_link(args)