hare v0.2.2 Hare.Adapter.Sandbox
Sandbox implementation for the Hare.Adapter
behaviour.
It is meant to be used only on tests.
This adapter allows the developer to inspect its history and modify
its behaviour during tests throught the Hare.Adapter.Sandbox.Backdoor
module.
Check Hare.Adapter.Sandbox.Backdoor
for more information.
Summary
Functions
Acks a message given its meta
Binds a queue to an exchange
Cancels the consumer with the given consumer_tag
Closes a channel
Closes the AMQP connection
Consumes messages from a queue
Declares an exchange
Declares a queue
Declares a server-named queue
Deletes an exchange
Deletes a queue
Gets a message from a queue
Transforms a message received by a consumed pid into one of the well defined terms expected by consumers
Links the caller to the process representing the channel
Monitors the process representing the channel
Monitors the process representing the AMQP connection
Nacks a message given its meta
Opens a channel through the given connection
Establishes connection with the AMQP server using the given config
Publishes a message to an exchange
Purges all messages in a queue
Sets the Quality Of Service of the channel
Rejects a message given its meta
Unbinds a queue from an exchange
Unlinks the caller to the process representing the channel
Functions
Acks a message given its meta
Callback implementation for Hare.Adapter.ack/3
.
Binds a queue to an exchange
Callback implementation for Hare.Adapter.bind/4
.
Cancels the consumer with the given consumer_tag
Callback implementation for Hare.Adapter.cancel/3
.
Closes a channel
Callback implementation for Hare.Adapter.close_channel/1
.
Closes the AMQP connection.
Callback implementation for Hare.Adapter.close_connection/1
.
Consumes messages from a queue.
Once a pid is consuming a queue status messages and actual queue messages must be sent to the consuming pid as elixir messages in a adapter-specific format.
The function handle/2
should receive that elixir messages and transform them into
well defined terms.
Callback implementation for Hare.Adapter.consume/4
.
Declares an exchange
Callback implementation for Hare.Adapter.declare_exchange/4
.
Declares a queue
Callback implementation for Hare.Adapter.declare_queue/3
.
Declares a server-named queue
Callback implementation for Hare.Adapter.declare_server_named_queue/2
.
Deletes an exchange
Callback implementation for Hare.Adapter.delete_exchange/3
.
Deletes a queue
Callback implementation for Hare.Adapter.delete_queue/3
.
Gets a message from a queue
Callback implementation for Hare.Adapter.get/3
.
Transforms a message received by a consumed pid into one of the well defined terms expected by consumers.
The expected terms are:
{:consume_ok, meta}
-consume-ok
message sent by the AMQP server when a consumer is started{:deliver, payload, meta}
- an actual message from the queue being consumed{:cancel_ok, meta}
-cancel-ok
message sent by the AMQP server when a consumer is started{:cancel, meta}
-cancel
message sent by the AMQP server when a consumer has been unexpectedly closed:unknown
- any other message
Callback implementation for Hare.Adapter.handle/1
.
Links the caller to the process representing the channel
Callback implementation for Hare.Adapter.link_channel/1
.
Monitors the process representing the channel
Callback implementation for Hare.Adapter.monitor_channel/1
.
Monitors the process representing the AMQP connection.
Callback implementation for Hare.Adapter.monitor_connection/1
.
Nacks a message given its meta
Callback implementation for Hare.Adapter.nack/3
.
Opens a channel through the given connection
Callback implementation for Hare.Adapter.open_channel/1
.
Establishes connection with the AMQP server using the given config.
Callback implementation for Hare.Adapter.open_connection/1
.
Publishes a message to an exchange
Callback implementation for Hare.Adapter.publish/5
.
Purges all messages in a queue
Callback implementation for Hare.Adapter.purge/2
.
Sets the Quality Of Service of the channel
Callback implementation for Hare.Adapter.qos/2
.
Rejects a message given its meta
Callback implementation for Hare.Adapter.reject/3
.
Unbinds a queue from an exchange
Callback implementation for Hare.Adapter.unbind/4
.
Unlinks the caller to the process representing the channel
Callback implementation for Hare.Adapter.unlink_channel/1
.