Amqpx.Gen.Consumer behaviour (amqpx v6.0.2)

Generic implementation of amqp consumer

Link to this section Summary

Functions

Returns a specification to start this module under a supervisor.

Callback implementation for GenServer.init/1.

Link to this section Types

@type state() :: %Amqpx.Gen.Consumer{
  backoff: term(),
  channel: term(),
  connection_name: term(),
  handler_module: term(),
  handler_state: term(),
  prefetch_count: term(),
  requeue_on_reject: term()
}

Link to this section Callbacks

Link to this callback

handle_message(any, map, map)

@callback handle_message(any(), map(), map()) :: {:ok, map()} | {:error, any()}
Link to this callback

handle_message_rejection(message, error)

(optional)
@callback handle_message_rejection(message :: any(), error :: any()) ::
  :ok | {:error, any()}
@callback setup(Amqpx.Channel.t()) :: {:ok, map()} | {:error, any()}

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.

Callback implementation for GenServer.init/1.

Link to this function

start_link(opts)

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