Module notifier_amqp_conn

Owns the single AMQP connection shared by every consumer (one TCP connection, one channel per consumer — the standard topology).

Behaviours: gen_server.

Description

Owns the single AMQP connection shared by every consumer (one TCP connection, one channel per consumer — the standard topology).

Connects asynchronously and retries with exponential backoff (1 s → 30 s) when the broker is unreachable or the connection drops, so the application boots — and keeps serving REST — while RabbitMQ is down. Consumers poll get_connection/0 and monitor the returned connection pid.

Function Index

connected/0
get_connection/0
handle_call/3
handle_cast/2
handle_info/2
init/1
start_link/0
terminate/2

Function Details

connected/0

connected() -> boolean()

get_connection/0

get_connection() -> {ok, pid()} | {error, not_connected}

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/0

start_link() -> gen_server:start_ret()

terminate/2

terminate(Reason, S) -> any()


Generated by EDoc