Help Center/ Distributed Message Service for RabbitMQ/ User Guide/ Managing Instances/ Viewing RabbitMQ Client Connection Addresses
Updated on 2024-10-25 GMT+08:00

Viewing RabbitMQ Client Connection Addresses

When a client is connected to a RabbitMQ instance for message production and consumption, you can view the client connection addresses on the RabbitMQ management UI.

  • The client connection addresses cannot be viewed on the management UI of RabbitMQ AMQP-0-9-1.
  • A client's connection addresses can be viewed only when the client is connected to a RabbitMQ instance.

Viewing RabbitMQ Client Connection Addresses

  1. Log in to the RabbitMQ management UI.
  2. In the navigation pane, choose Connections.
  3. View client connection addresses, as shown in Figure 1.

    Figure 1 Client connection addresses

    A client can function as a producer to create messages and as a consumer to retrieve messages. The producer and consumer IP addresses are the same, as shown in Figure 1, and are difficult to distinguish. To differentiate between producer and consumer IP addresses, you can set the clientProperties parameter on the client. The following is an example:

    // Configure client connection parameters.
    HashMap<String, Object> clientProperties = new HashMap<>();
    clientProperties.put("connection_name", "producer");
    connectionFactory.setClientProperties(clientProperties);
    
    // Create a connection.
    Connection connection = connectionFactory.newConnection();

    After the clientProperties parameter is set, the connection addresses are displayed as shown in Figure 2.

    Figure 2 Client connection addresses (with producer/consumer differentiated)