conejo v0.3.3 Conejo.Channel behaviour

Conejo.Channel is the behaviour which will help you to implement your own RabbitMQ Channels.

This behaviour is a low level module. I recommend to use Conejo.Consumeror Conejo.Publisher for your applications.

Summary

Callbacks

It publishes data asynchronously

The channel starts to consume data

Callback called when a message is received

It publishes data synchronously

Types

channel()
channel() :: AMQP.Channel
data()
data() :: any
exchange()
exchange() :: String.t
exchange_type()
exchange_type() :: String.t
options()
options() :: any
params()
params() :: %{}
payload()
payload() :: any
queue()
queue() :: AMQP.Queue
redelivered()
redelivered() :: any
tag()
tag() :: any

Callbacks

async_publish(any, exchange, arg2, payload)
async_publish(any, exchange, String.t, payload) :: any

It publishes data asynchronously

bind_queue(channel, queue, exchange, options)
bind_queue(channel, queue, exchange, options) :: any

It binds to a queue

consume_data(channel, queue, boolean)
consume_data(channel, queue, boolean) :: {:ok, String.t}

The channel starts to consume data

declare_exchange(channel, exchange, exchange_type)
declare_exchange(channel, exchange, exchange_type) :: any

It declares an exchange

declare_queue(channel, queue, options)
declare_queue(channel, queue, options) :: any

It declares a queue

do_consume(channel, payload, params)
do_consume(channel, payload, params) :: any

Callback called when a message is received

sync_publish(any, exchange, arg2, payload)
sync_publish(any, exchange, String.t, payload) :: any

It publishes data synchronously