Amqpx.Gen.Producer (amqpx v6.0.2)

Generic implementation of amqp producer

Link to this section Summary

Link to this section Types

@type state() :: %Amqpx.Gen.Producer{
  backoff: term(),
  channel: term(),
  connection_name: term(),
  exchanges: term(),
  publish_retry_options: term(),
  publish_timeout: term(),
  publisher_confirms: term()
}

Link to this section Functions

Link to this function

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function

do_publish_by(producer_name, exchange_name, routing_key, payload, options, attempt)

Callback implementation for GenServer.init/1.

Link to this function

publish(exchange_name, routing_key, payload, options \\ [])

@spec publish(
  exchange_name :: String.t(),
  routing_key :: String.t(),
  payload :: String.t(),
  options :: Keyword.t()
) :: :ok | :error
Link to this function

publish_by(producer_name, exchange_name, routing_key, payload, options \\ [])

@spec publish_by(
  producer_name :: GenServer.name(),
  exchange_name :: String.t(),
  routing_key :: String.t(),
  payload :: String.t(),
  options :: Keyword.t()
) :: :ok | :error
Link to this function

start_link(opts)

@spec start_link(opts :: map()) :: GenServer.server()