AMQPHelpers.Reliability.Consumer.start_link

You're seeing just the function start_link, go back to AMQPHelpers.Reliability.Consumer module for more information.
Link to this function

start_link(opts \\ [])

Specs

start_link(options()) :: GenServer.on_start()

Starts a Consumer process linked to the current process.

Options

The following option can be given to Consumer when starting it. Note that message_handler and queue_name are required.

  • adapter - Sets the AMQPHelpers.Adapter. Defaults to AMQPHelpers.Adapters.AMQP.
  • channel - The channel to use to consume messages. NOTE: do not use this for production environments because this Consumer does not supervise the given channel. Instead, use channel_name which makes use of AMQP.Application.
  • channel_name - The name of the configured channel to use. See AMQP.Application for more information. Defaults to :default.
  • consume_on_init - If the consumer should start consuming messages on init or not. Defaults to true.
  • consume_options - The options given to AMQPHelpers.Adapter.consume/4.
  • message_handler - The function that will deal with messages. Required.
  • prefetch_count - The maximum number of unacknowledged messages in the channel. See AMQP.Basic.qos2 for more info.
  • prefetch_size - The maximum number of unacknowledged bytes in the channel. See AMQP.Basic.qos2 for more info.
  • queue_name - The name of the queue to consume. Required.
  • requeue - Whether to requeue messages or not after a consume error. Defaults to true.
  • retry_interval - The number of millisecond to wait if an error happens when trying to consume messages or when trying to open a channel.
  • shutdown_gracefully - If enabled, the consumer will cancel the subscription when terminating. Default to false but enforced if consumer_options has exclusive set to true.
  • task_supervisor - The Task.Supervisor which runs message handling tasks. If not provided, the Consumer will handle messages synchronously.

GenServer.options/0 are also available. See GenServer.start_link/2 for more information about these.