tencent cloud

Feedback

Querying Message

Last updated: 2022-05-06 16:06:34

    Overview

    When encountering a consumption exception, you can troubleshoot the problem by querying the message in the CKafka console. This document describes how to query messages in the CKafka console.

    The console supports query by offset and time, which are used in different scenarios:

    • Query by offset: You know the ID of a topic's partition to which the message is sent and the offset of the message.
    • Query by time: You are not sure about the offset of the message but know when the message is sent.
    Note:

    • The console does not list all the messages after the specified time or offset. You can query at most 20 messages at a time.
    • Refrain from frequently querying as message query also consumes bandwidth.

    Directions

    Query by offset

    1. Log in to the CKafka console.
    2. Select Instance List on the left sidebar, select a region, and click the ID/Name of the target instance to enter the instance details page.
    3. On the instance details page, select Topic Management and click More> Message Query in the Operation column on the right of the target topic.
    4. Select Query by offset, enter the partition ID and starting offset, and click Query to view the message details.
      • Partition ID: Topic partition to which the message is sent
      • Offset: Consumer offset of the message
      • Timestamp: timestamp in ProducerRecord
      • Operation: Click View Message Details to view the key and value of the message.

    Query by time

    1. Log in to the CKafka console.
    2. Select Instance List on the left sidebar, select a region, and click the ID/Name of the target instance to enter the instance details page.
    3. On the instance details page, select Topic Management and click More> Message Query in the Operation column on the right of the target topic.
    4. Select Query by start time, enter the partition ID and time, and click Query to view the message details.
      If you select all partitions, messages of all partitions will be displayed; if you specify a partition, messages of the specified partition will be displayed.
      • Partition ID: Topic partition to which the message is sent
      • Offset: Consumer offset of the message
      • Timestamp: timestamp in ProducerRecord
      • Operation: Click View Message Details to view the key and value of the message.
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support