rabbitmq / rabbitmq-server

Open source RabbitMQ: core server and tier 1 (built-in) plugins
https://www.rabbitmq.com/
Other
12.04k stars 3.9k forks source link

Listing AMQP 1.0 Connections Through Command Line Does Not Work #4238

Closed luos closed 1 year ago

luos commented 2 years ago

Hi,

When using the AMQP 1.0 plugin or AMQP 1.0 Shovels the connections are not listed using the rabbitmqctl list_amqp10_connections command.

I suspect the reason is that the code was not updated for the new vhost architecture? https://github.com/rabbitmq/rabbitmq-server/blob/c842a6c1484790f0b6de07e2f760758387694723/deps/rabbitmq_amqp1_0/src/rabbit_amqp1_0.erl#L33

The new way looks to be to join the process groups. Seems like the plugin should call rabbit_networking:register_non_amqp_connection for it to join the relevant process groups?

Additionally the AMQP 1.0 Plugins Direct Connections (also 0.9.1 shovels) are also not listed in the normal rabbitmqctl list_connections. The reason for that is that direct connections are not listed by that command. I am not sure that's an issue though.

lukebakken commented 1 year ago

Related discussion: https://groups.google.com/g/rabbitmq-users/c/RNUCDVoYzJs/

I took that users's code and created the following simple reproducer:

https://github.com/lukebakken/Amqp10SessionExample

dotnet run will fetch deps, compile and run it. It assumes AMQP 1.0 is enabled and running on localhost.