doc-exports/docs/dms/umn/kafka-ug-0015.html
Chen, Junjie ca9677b121 DMS UMN 20230201 Version
Reviewed-by: Antonova, Ekaterina <ekantono@noreply.gitea.eco.tsi-dev.otc-service.com>
Co-authored-by: Chen, Junjie <chenjunjie@huawei.com>
Co-committed-by: Chen, Junjie <chenjunjie@huawei.com>
2024-07-22 13:20:04 +00:00

6.5 KiB

Viewing Kafka Consumer Details

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

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 Service List and choose Application > Distributed Message Service. The Kafka instance list is displayed.
  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 press Enter.

Viewing the Consumer List (Kafka CLI)

  • For a Kafka instance with ciphertext access disabled, run the following command in the /bin directory of the Kafka client:
    ./kafka-consumer-groups.sh --bootstrap-server ${connection-address} --group ${group-name} --members --describe
  • For a Kafka instance with ciphertext access enabled, do as follows:
    1. (Optional) For the Kafka security protocol, is SASL_PLAINTEXT or SASL_SSL used?
      • SASL_PLAINTEXT: Skip this step if the username and password are already set. In other cases, create the ssl-user-config.properties file in the /config directory of the Kafka client. Add the username and password by referring to 3.
      • SASL_SSL: Skip this step if the username, password, and SSL certificate are already set. In other cases, 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 /bin directory of the Kafka client:
      ./kafka-consumer-groups.sh --bootstrap-server ${connection-address} --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 Service List and choose Application > Distributed Message Service. The Kafka instance list is displayed.
  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.