Skip to content

Connections

Managing RabbitMQ TCP connections.

all() -> list[dict] async

List all open connections in the cluster.

by_user(username: str) -> list[dict] async

List all open connections for a specific user.

channels(connection: str) -> list[dict] async

List all channels associated with a specific connection.

Parameters:

Name Type Description Default
connection str

The connection name (e.g., '127.0.0.1:54321 -> 127.0.0.1:5672').

required

close(connection: str, *, reason: Optional[str] = None) -> dict async

Forcefully close a specific connection.

Parameters:

Name Type Description Default
reason Optional[str]

Optional string provided to the client via 'X-Reason' header.

None

close_user_connections(username: str, *, reason: Optional[str] = None) -> dict async

Forcefully close all connections for a specific user.

Parameters:

Name Type Description Default
reason Optional[str]

Optional string provided to the client via 'X-Reason' header.

None

detail(connection: str) -> dict async

Get detailed information about an individual connection.