tencent cloud

Feedback

Querying Message

Last updated: 2024-01-09 14:49:39

    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.

    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.
    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 Download Message to download the message, including its headers, key, and value.
    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