conejo v0.5.0 Conejo.Channel behaviour View Source

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.

Link to this section Summary

Callbacks

It publishes data asynchronously

The channel starts to consume data

Callback called when a message is received

It publishes data synchronously

Link to this section Types

Link to this type channel() View Source
channel() :: AMQP.Channel
Link to this type exchange() View Source
exchange() :: String.t()
Link to this type exchange_type() View Source
exchange_type() :: String.t()
Link to this type options() View Source
options() :: any()
Link to this type params() View Source
params() :: %{}
Link to this type payload() View Source
payload() :: any()
Link to this type queue() View Source
queue() :: AMQP.Queue
Link to this type redelivered() View Source
redelivered() :: any()

Link to this section Callbacks

Link to this callback async_publish(any, exchange, arg2, payload) View Source
async_publish(any(), exchange(), String.t(), payload()) :: any()

It publishes data asynchronously

Link to this callback bind_queue(channel, queue, exchange, options) View Source
bind_queue(channel(), queue(), exchange(), options()) :: any()

It binds to a queue

Link to this callback consume_data(channel, queue, boolean) View Source
consume_data(channel(), queue(), boolean()) :: {:ok, String.t()}

The channel starts to consume data

Link to this callback declare_exchange(channel, exchange, exchange_type) View Source
declare_exchange(channel(), exchange(), exchange_type()) :: any()

It declares an exchange

Link to this callback declare_queue(channel, queue, options) View Source
declare_queue(channel(), queue(), options()) :: any()

It declares a queue

Link to this callback do_consume(channel, payload, params) View Source
do_consume(channel(), payload(), params()) :: any()

Callback called when a message is received

Link to this callback sync_publish(any, exchange, arg2, payload) View Source
sync_publish(any(), exchange(), String.t(), payload()) :: any()

It publishes data synchronously