Querying a Message with the Specified Offset

This API is out-of-date and may not be maintained in the future.

URI

GET /v1.0/{project_id}/instance/{instance_id}/manage/topic/{topic_name}/partition/{partition}/offset/{offset}/message

Table 1 describes the parameters.

Table 1 Parameters

Parameter

Type

Mandatory

Description

project_id

String

Yes

Project ID.

instance_id

String

Yes

Instance ID.

topic_name

String

Yes

Topic name.

partition

Integer

Yes

Partition number. Value range: 0–19.

offset

String

Yes

Message offset.

Request

Request parameters

None.

Example request

None.

Response

Response parameters

Table 2 describes the response parameter.

Table 2 Response parameter

Parameter

Type

Description

message

Object of message

Message list. For details, see Table 3.

Table 3 message parameters

Parameter

Type

Description

key

String

Message key.

value

String

Message content.

topic

String

Topic name.

partition

Integer

Partition number.

message_offset

Long

Message offset.

size

Integer

Message size, in bytes.

timestamp

Long

Message timestamp.

Example response

{
    "message": 
        {
            "topic": "mytest",
            "partition": 0,
            "message_offset": 7,
            "key": null,
            "value": "kasjdf",
            "size": 6,
            "timestamp": 1568125036045
        }
}