Broker connection (kombu.Connection), managing transport resolution, URL parsing,
multi-URL failover (round-robin / shuffle), lazy connection & default channel creation,
and operation retry (ensure_connection/2, ensure/4, autoretry/3).
Summary
Functions
Records entity_key in the connection's declared_entities set.
Formats the connection parameters as a URL string (Connection.as_uri).
Wraps fun (which accepts channel as its last argument or via :channel option)
with automatic reconnection and channel revival, returning {result, channel}.
Creates and returns a new channel process for conn.
Returns a 0-arity function that lazily returns the connection's default_channel (Connection.channel_promise).
Validates a transport scheme extracted from a URL (forbidding . or :).
Clears all declared entities on conn.
Creates a clone of conn with optional parameter overrides.
Alias for release/1.
Cleans up connection resources and clears declared_entities.
Returns true if a failover cycle round is complete after retries (0-indexed).
Establishes the connection immediately (max_retries: 1).
Returns the underlying transport connection map.
Returns true if the connection is currently established and viable.
Returns the underlying transport connection map, connecting lazily if needed.
Returns the set of entities declared on this connection session.
Returns the default channel for conn, creating it lazily if needed.
Waits for a single event from the broker on conn's default channel.
Wraps an operation fun on obj so that recoverable connection/channel errors
trigger reconnection, revive, and retry (Connection.ensure).
Ensures conn has an active connection to the broker, retrying according to opts
and rotating through alternate URLs if configured. Returns conn.
Resolves a transport identifier ("redis", "rediss", "memory", or module atom)
to its transport module.
Returns true if entity_key has been declared on this connection session.
Checks heartbeats (no-op for transports that do not use heartbeats).
Returns "hostname:port" for the connection.
Returns connection parameters as a map (Connection.info).
Returns true if obj is a %Kombu.Connection{}.
Resolves a connection, channel promise, or channel into a concrete channel.
Closes channel, ignoring any connection or channel errors.
Switches to the next alternate URL according to the configured failover strategy.
Creates a new %Kombu.Connection{} from a URL string, list of URLs, or keyword options.
Returns the list of recoverable channel error modules for conn.
Returns the list of recoverable connection error modules for conn.
Closes the connection and its default channel, clearing declared entities.
Revives the connection after re-establishment, closing old default channel if replaced.
Returns true if the connection's transport supports exchange_type.
Switches connection parameters to conn_str (URL or hostname) without reconnecting.
Types
@type t() :: %Kombu.Connection{ alternates: term(), connect_timeout: term(), credential_provider: term(), extra_opts: term(), failover_strategy: term(), heartbeat: term(), hostname: term(), initial_params: term(), insist: term(), login_method: term(), password: term(), port: term(), ssl: term(), state_pid: term(), transport: term(), transport_options: term(), uri_prefix: term(), userid: term(), virtual_host: term() }
Functions
Records entity_key in the connection's declared_entities set.
Formats the connection parameters as a URL string (Connection.as_uri).
Wraps fun (which accepts channel as its last argument or via :channel option)
with automatic reconnection and channel revival, returning {result, channel}.
Creates and returns a new channel process for conn.
Returns a 0-arity function that lazily returns the connection's default_channel (Connection.channel_promise).
Validates a transport scheme extracted from a URL (forbidding . or :).
@spec clear_declared_entities(t()) :: :ok
Clears all declared entities on conn.
Creates a clone of conn with optional parameter overrides.
Alias for release/1.
Cleans up connection resources and clears declared_entities.
@spec completes_cycle?(t(), non_neg_integer()) :: boolean()
Returns true if a failover cycle round is complete after retries (0-indexed).
Establishes the connection immediately (max_retries: 1).
Returns the underlying transport connection map.
Returns true if the connection is currently established and viable.
Returns the underlying transport connection map, connecting lazily if needed.
Returns the set of entities declared on this connection session.
Returns the default channel for conn, creating it lazily if needed.
Waits for a single event from the broker on conn's default channel.
Wraps an operation fun on obj so that recoverable connection/channel errors
trigger reconnection, revive, and retry (Connection.ensure).
Returns a function accepting either () (0-arity) or (args_list) (1-arity)
that invokes fun with automatic retry and revival.
Ensures conn has an active connection to the broker, retrying according to opts
and rotating through alternate URLs if configured. Returns conn.
Resolves a transport identifier ("redis", "rediss", "memory", or module atom)
to its transport module.
Returns true if entity_key has been declared on this connection session.
Checks heartbeats (no-op for transports that do not use heartbeats).
Returns "hostname:port" for the connection.
Returns connection parameters as a map (Connection.info).
Returns true if obj is a %Kombu.Connection{}.
@spec maybe_channel(t() | function() | Kombu.Channel.t()) :: Kombu.Channel.t()
Resolves a connection, channel promise, or channel into a concrete channel.
Closes channel, ignoring any connection or channel errors.
Switches to the next alternate URL according to the configured failover strategy.
Creates a new %Kombu.Connection{} from a URL string, list of URLs, or keyword options.
Returns the list of recoverable channel error modules for conn.
Returns the list of recoverable connection error modules for conn.
Closes the connection and its default channel, clearing declared entities.
@spec reset_declared_entities(t()) :: :ok
Alias for clear_declared_entities/1.
Revives the connection after re-establishment, closing old default channel if replaced.
Returns true if the connection's transport supports exchange_type.
Switches connection parameters to conn_str (URL or hostname) without reconnecting.