tencent cloud

Feedback

Querying Message

Last updated: 2024-11-07 15:35:58

    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 CKafka 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 don't know 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 querying also consumes bandwidth.
    Currently, message queries only support querying messages within 1 MB.

    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 Download Message to download the message in the format of "header, key, value".
    Click 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.
    
    Partition ID: Topic partition to which the message is sent.
    Offset: Consumer offset of the message.
    Timestamp: timestamp in ProducerRecord.
    Operation:
    Click Download Message to download the message, including its headers, key, and value. Batch message downloading is supported.
    Click View Details to view the details 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