Module amqp_gen_consumer

A behaviour module for implementing consumers for amqp_channel.

Behaviours: gen_server2.

Description

A behaviour module for implementing consumers for amqp_channel. To specify a consumer implementation for a channel, use amqp_connection:open_channel/{2,3}.
All callbacks are called within the gen_consumer process.

See comments in amqp_gen_consumer.erl source file for documentation on the callback functions.
Note that making calls to the channel from the callback module will result in deadlock.

Data Types

ok_error()

ok_error() = {ok, state()} | {error, reason(), state()}

Denotes a successful or an error return from a consumer module call.

Function Index

call_consumer/2This function is used to perform arbitrary calls into the consumer module.
call_consumer/3This function is used by amqp_channel to forward received methods and deliveries to the consumer module.
call_consumer/4
code_change/3
handle_call/3
handle_cast/2
handle_info/2
init/1
prioritise_info/3
start_link/3
terminate/2

Function Details

call_consumer/2

call_consumer(Pid::Consumer, Msg) -> ok

This function is used to perform arbitrary calls into the consumer module.

call_consumer/3

call_consumer(Pid::Consumer, Method, Args) -> ok

This function is used by amqp_channel to forward received methods and deliveries to the consumer module.

call_consumer/4

call_consumer(Pid, Method, Args, DeliveryCtx) -> any()

code_change/3

code_change(OldVsn, State, Extra) -> any()

handle_call/3

handle_call(X1, From, State) -> any()

handle_cast/2

handle_cast(What, State) -> any()

handle_info/2

handle_info(Info, State) -> any()

init/1

init(X1) -> any()

prioritise_info/3

prioritise_info(X1, Len, State) -> any()

start_link/3

start_link(ConsumerModule, ExtraParams, Identity) -> any()

terminate/2

terminate(Reason, State) -> any()


Generated by EDoc, Aug 16 2017, 13:18:37.