A channel is created for each unique connection from a client system to RabbitMQ.
The rabbitmqctl command with the list_channels option can be used to list all of the current channels.
Something like this should be returned.
~]# rabbitmqctl list_channels Listing channels pid user consumer_count messages_unacknowledged <firstname.lastname@example.org> john.doe 0 0 <email@example.com> jane.doe 0 0 <firstname.lastname@example.org> jack.doe 1 0
The name and user options are commonly used to display the IP address and ephemeral port that the connection came from (source) and the IP address and AMQ port of the RabbitMQ system. In this example, the connections came from the 10.12.211.15 IP addresses and the RabbitMQ system has IP address 10.16.11.105 with port 5671 for AMQ connections.
~]# rabbitmqctl list_channels name user 10.12.211.15:11525 -> 10.16.11.105:5671 (1) john.doe 10.12.211.15:17551 -> 10.16.11.105:5671 (2) jane.doe 10.12.211.15:21155 -> 10.16.11.105:5671 (1) jack.doe
Here are all of the possible options.
The --formatter json option can be used to return the output in JSON.
rabbitmqctl list_channels --formatter json
Lisewise, events like this should be found in the RabbitMQ log for each channel connection.
2022-01-11 22:59:05.838 [info] <0.2445.0> accepting AMQP connection <0.2445.0> (10.12.211.15:21155 -> 10.16.11.105:5671) 2022-01-11 22:59:06.120 [info] <0.2445.0> connection <0.2445.0> (10.12.211.15:21155 -> 10.16.11.105:5671): user 'jack.doe' authenticated and granted access to vhost 'foo' 2022-01-11 22:59:13.869 [info] <0.2445.0> closing AMQP connection <0.2445.0> (10.12.211.15:21155 -> 10.16.11.105:5671, vhost: 'foo', user: 'jack.doe') 2022-01-11 22:59:13.871 [info] <0.2466.0> Closing all channels from connection '10.12.211.15:21155 -> 10.16.11.105:5671' because it has been closed