Module notifier_amqp_consumer

RabbitMQ consumer.

Behaviours: gen_server.

Description

RabbitMQ consumer.

Opens its own channel on the shared connection, optionally declares the exchange (AMQP_EXCHANGE, AMQP_EXCHANGE_TYPE), the durable queue (AMQP_QUEUE) and one binding per AMQP_ROUTING_KEYS entry, sets the prefetch, and consumes.

Every message body is one event JSON object (see notifier_event) or a JSON array of them. Per message: If the connection or channel goes away the worker drops back to a disconnected state and re-subscribes once the connection returns.

Function Index

handle_body/1Process one message body; exported for tests.
handle_call/3
handle_cast/2
handle_info/2
init/1
start_link/1
terminate/2

Function Details

handle_body/1

handle_body(Body::binary()) -> ack | reject

Process one message body; exported for tests.

handle_call/3

handle_call(Req, From, S) -> any()

handle_cast/2

handle_cast(Msg, S) -> any()

handle_info/2

handle_info(Info, S) -> any()

init/1

init(X1) -> any()

start_link/1

start_link(Id::pos_integer()) -> gen_server:start_ret()

terminate/2

terminate(Reason, S) -> any()


Generated by EDoc