Managing Topics on Kafka UI

Scenario

On Kafka UI, you can view topic details, modify topic configurations, add topic partitions, delete topics, and view the number of data records produced in different time segments in real time.

Note

  • In security mode, Kafka UI does not authenticate the operation of viewing topic details. That is, any user can query topic information. To modify topic configurations, add topic partitions, or delete topics, ensure that the Kafka UI login user belongs to the kafkaadmin user group or grant the corresponding operation permissions to the user. Otherwise, the authentication fails.

  • In non-security mode, Kafka UI does not authenticate any operation.

Viewing Topic Details

  1. Log in to Kafka UI. For details, see Accessing Kafka UI.

  2. Click Topics. The topic management page is displayed.

  3. In the Topic List area, you can view the names, status, number of partitions, creation time, and number of replicas of topics created in the current cluster.

    image1

  4. Click a topic name to view details about the topic and partition.

    image2

  5. In the Producer Message area, you can select Day, Week, or Month based on service requirements to view the number of data records produced in the topic.

    image3

Modifying the Topic Configuration

  1. Log in to Kafka UI. For details, see Accessing Kafka UI.

  2. Click Topics. The topic management page is displayed.

  1. In the Operation column of the item to be modified, choose Action > Config. On the displayed page, change the values of Key and Value of the topic. To add multiple items, click image4.

  2. Click OK.

Searching for a Topic

  1. Log in to Kafka UI. For details, see Accessing Kafka UI.

  2. Click Topics. The topic management page is displayed.

  3. In the upper right corner of the page, enter a topic name to search for the topic.

Adding a Partition

  1. Log in to Kafka UI. For details, see Accessing Kafka UI.

  2. Click Topics. The topic management page is displayed.

  3. In the Operation column of the item to be modified, choose Action > Alter. On the displayed page, modify the topic partition.

    Note

    Currently, you can only add partitions to a cluster. That is, the number of partitions after modification must be greater than the number of original partitions.

  4. Click OK.

Deleting a Topic

  1. Log in to Kafka UI. For details, see Accessing Kafka UI.

  2. Click Topics. The topic management page is displayed.

  3. In the Operation column of the item to be modified, choose Action > Delete.

  4. In the confirmation dialog box that is displayed, click OK.

    Note

    The default built-in topics cannot be deleted.

Viewing the Number of Data Records Produced

  1. Log in to Kafka UI. For details, see Accessing Kafka UI.

  2. Click Topics. The topic management page is displayed.

  3. In the Producer Message area, you can select Day, Week, or Month to view the number of data records produced in different time segments in the current cluster.

    image5