lapin v0.4.0 Lapin.Pattern behaviour View Source

Extensible behaviour to define pattern modules.

Lapin provides a number of submodules which impelment the patterns found in the RabbitMQ Tutorials.

defmodule ExampleApp.SomePatter do
  use Lapin.Pattern

  [... callbacks implementation ...]
end

Link to this section Summary

Types

t()

Lapin Pattern Behaviour

Callbacks

Consumer acknowledgements enabled

Consumer message prefetch count

Declare exchange durable

Declare exchange type

Request publisher confirms (RabbitMQ only)

Request message mandatory routing when publishing

Request message persistence when publishing

Declare queue arguments

Declare queue durable

Bind queue to routing_key

Link to this section Types

Link to this type

t() View Source
t() :: Lapin.Pattern

Lapin Pattern Behaviour

Link to this section Callbacks

Link to this callback

consumer_ack(channel) View Source
consumer_ack(channel :: Lapin.Channel.t()) :: boolean()

Consumer acknowledgements enabled

Link to this callback

consumer_prefetch(channel) View Source
consumer_prefetch(channel :: Lapin.Channel.t()) ::
  Lapin.Channel.consumer_prefetch()

Consumer message prefetch count

Link to this callback

exchange_durable(channel) View Source
exchange_durable(channel :: Lapin.Channel.t()) :: boolean()

Declare exchange durable

Link to this callback

exchange_type(channel) View Source
exchange_type(channel :: Lapin.Channel.t()) :: boolean()

Declare exchange type

Link to this callback

publisher_confirm(channel) View Source
publisher_confirm(channel :: Lapin.Channel.t()) :: boolean()

Request publisher confirms (RabbitMQ only)

Link to this callback

publisher_mandatory(channel) View Source
publisher_mandatory(channel :: Lapin.Channel.t()) :: boolean()

Request message mandatory routing when publishing

Link to this callback

publisher_persistent(channel) View Source
publisher_persistent(channel :: Lapin.Channel.t()) :: boolean()

Request message persistence when publishing

Link to this callback

queue_arguments(channel) View Source
queue_arguments(channel :: Lapin.Channel.t()) :: Lapin.Channel.queue_arguments()

Declare queue arguments

Link to this callback

queue_durable(channel) View Source
queue_durable(channel :: Lapin.Channel.t()) :: boolean()

Declare queue durable

Link to this callback

routing_key(channel) View Source
routing_key(channel :: Lapin.Channel.t()) :: Lapin.Channel.routing_key()

Bind queue to routing_key