Roger.Queue (roger v4.0.0)

Copy Markdown View Source

Functions related to queues.

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.

Types

t()

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

Functions

define(arg)

define(type, max_workers)

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

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

purge(partition_id, queue_type)

Flushes all messages on the given queue.

setup_channel(queue)

@spec 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.