Roger.Queue (roger v3.0.0) View Source

Functions related to queues.

Link to this section Summary

Functions

Given a partition and a queue type, construct the Queue's name for RabbitMQ.

Flushes all messages on the given queue.

Setup channel with the queue options. This makes sure the channel prefetch count follows the queue max worker size.

Link to this section Types

Specs

t() :: %Roger.Queue{
  channel: term(),
  channel_ref: term(),
  confirmed: term(),
  consumer_tag: term(),
  max_workers: term(),
  type: term()
}

Link to this section Functions

Link to this function

define(type, max_workers)

View Source
Link to this function

make_name(partition_id, type, postfix \\ "")

View Source

Given a partition and a queue type, construct the Queue's name for RabbitMQ.

Link to this function

purge(partition_id, queue_type)

View Source

Flushes all messages on the given queue.

Specs

setup_channel(queue :: t()) :: {atom(), t()}

Setup channel with the queue options. This makes sure the channel prefetch count follows the queue max worker size.