Updated on 2022-08-12 GMT+08:00

Querying Messages

Scenario

You can view the size, creation time, and body of messages in topics.

Procedure

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

    Select the same region as your application service.

  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. Click the Message Query tab. Then specify the topic name and the search method.

    You can search by the following methods:

    • Creation time: Search by the time that messages are created.
    • Offset: Search by the message position.

    If a topic contains a large amount of data, an internal service error may be reported when you query messages in a topic with only one replica. You can shorten the time range for query based on the data volume.

    The following shows messages that have been queried.

    Figure 1 Querying topic messages

    Message Size indicates the size of messages stored on the disk. Click View Message Body to view details about a message.