Behaviours: gen_server.
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 pollget_connection/0 and monitor the
returned connection pid.
| connected/0 | |
| get_connection/0 | |
| handle_call/3 | |
| handle_cast/2 | |
| handle_info/2 | |
| init/1 | |
| start_link/0 | |
| terminate/2 |
connected() -> boolean()
get_connection() -> {ok, pid()} | {error, not_connected}
handle_call(Req, From, S) -> any()
handle_cast(Msg, S) -> any()
handle_info(Info, S) -> any()
init(X1) -> any()
start_link() -> gen_server:start_ret()
terminate(Reason, S) -> any()
Generated by EDoc