Updated on 2024-05-30 GMT+08:00

Viewing Kafka Consumer Details

This section describes how to view the consumer list and consumer connection addresses.

Due to cache reasons, the consumer connection addresses displayed on Kafka Manager may have expired. In this case, restart Kafka Manager.

Prerequisites

The consumer list and connection address can be viewed only when consumers in a consumer group are connected to the Kafka instance (that is, the consumer group is in the STABLE state).

Viewing the Consumer List (Console)

  1. Log in to the console.
  2. Click in the upper left corner to select a region.

    Select the region where your Kafka instance is located.

  3. Click and choose Application > Distributed Message Service for Kafka to open the console of DMS for Kafka.
  4. Click the desired Kafka instance to view the instance details.
  5. In the navigation pane, choose Consumer Groups.
  6. Click the name of the desired consumer group.
  7. On the Consumers tab page, view the consumer list.

    In the consumer list, you can view the consumer ID, consumer address, and client ID.

  8. (Optional) To query a specific consumer, enter the consumer ID in the search box and click .

Viewing the Consumer List (Kafka CLI)

  • If SASL is not enabled for the Kafka instance, run the following command in the /{directory where the CLI is located}/kafka_{version}/bin/ directory to query the consumer list:
    ./kafka-consumer-groups.sh --bootstrap-server {broker_ip}:{port} --group {group_name} --members --describe
  • If SASL has been enabled for the Kafka instance, perform the following steps to query the consumer list:
    1. (Optional) If the username and password, and the SSL certificate configuration has been set, skip this step. Otherwise, perform the following operations:

      Create the ssl-user-config.properties file in the /config directory of the Kafka client. Add the username and password, and the SSL certificate configuration by referring to 3.

    2. Run the following command in the /{directory where the CLI is located}/kafka_{version}/bin/ directory to query the consumer list:
      ./kafka-consumer-groups.sh --bootstrap-server {broker_ip}:{port} --group {group_name} --members --describe --command-config ./config/ssl-user-config.properties 

Viewing Consumer Connection Addresses (Console)

  1. Log in to the console.
  2. Click in the upper left corner to select a region.

    Select the region where your Kafka instance is located.

  3. Click and choose Application > Distributed Message Service for Kafka to open the console of DMS for Kafka.
  4. Click the desired Kafka instance to view the instance details.
  5. In the navigation pane, choose Consumer Groups.
  6. Click the desired consumer group.
  7. On the Consumers tab page, view the consumer addresses.

    Figure 1 Consumer list

Viewing Consumer Connection Addresses (Kafka Manager)

  1. Log in to Kafka Manager.
  2. Click kafka_cluster to go to the cluster details page.
  3. On the top menu bar, choose Consumers.

    Figure 2 Navigation bar

  4. Click the desired consumer group to view the topics that the group has subscribed to.

    Figure 3 Consumer group list

  5. Click the desired topic to go to the topic details page.

    Figure 4 Topics that the consumer group has subscribed to

  6. In the Consumer Instance Owner column, view the consumer connection address.

    Figure 5 Topic details page