AMQPHelpers.HighThroughput (AMQP Helpers v1.6.0)

View Source

Utilities for dealing with high-throughput scenarios.

This module provides a couple of functions which enforce some options to achieve good results on high throughput scenarios. Review the High Throughput section for more information.

Summary

Functions

consume(adapter \\ Adapter, channel, queue, consumer \\ nil, options \\ [])

@spec consume(module(), AMQP.Channel.t(), String.t(), pid() | nil, keyword()) ::
  {:ok, String.t()} | AMQP.Basic.error()

Registers a queue consumer process.

Like AMQP.Basic.consume/4 but enforces options which play nicely with a high throughput scenario.

publish(adapter \\ Adapter, channel, exchange, routing_key, payload, options \\ [])

Publishes a message to an Exchange.

Like AMQP.Basic.publish/5 but enforces options which play nicely with a high throughput scenario.