Module amqp_direct_consumer

This module is an implementation of the amqp_gen_consumer behaviour and can be used as part of the Consumer parameter when opening AMQP channels.

Behaviours: amqp_gen_consumer.

Description

This module is an implementation of the amqp_gen_consumer behaviour and can be used as part of the Consumer parameter when opening AMQP channels.

The Consumer parameter for this implementation is {amqp_direct_consumer, [ConsumerPid]}, where ConsumerPid is a process that will receive queue subscription-related messages.

This consumer implementation causes the channel to send to the ConsumerPid all basic.consume, basic.consume_ok, basic.cancel, basic.cancel_ok and basic.deliver messages received from the server.

In addition, this consumer implementation monitors the ConsumerPid and exits with the same shutdown reason when it dies. 'DOWN' messages from other sources are passed to ConsumerPid.
Warning! It is not recommended to rely on a consumer on killing off the channel (through the exit signal). That may cause messages to get lost. Always use amqp_channel:close/{1,3} for a clean shut down.

This module has no public functions.

Function Index

handle_deliver/4

Function Details

handle_deliver/4

handle_deliver(M, A, DeliveryCtx, C) -> any()


Generated by EDoc