Share via


Consumer - Consume Topic In Partition With Offset

Consume records using a simple consumer
Consume records from one partition of a topic beginning with a specific offset. By default count is 1. It can read maximum of 6 megabytes of data at once

GET https://clustername-kafkarest.azurehdinsight.net/v1/consumer/topics/{topic}/partitions/{partition}/offsets/{offset}
GET https://clustername-kafkarest.azurehdinsight.net/v1/consumer/topics/{topic}/partitions/{partition}/offsets/{offset}?count={count}

URI Parameters

Name In Required Type Description
offset
path True

integer (int64)

Offset to start from

partition
path True

integer (int32)

Partition ID to consume the records from

topic
path True

string

Topic to consume the records from

count
query

integer (int32)

Number of records to consume (optional). By default count is 1. It returns either count of records or 6 megabytes of data, which is smaller.

Responses

Name Type Description
200 OK

ConsumeRecord[]

successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

403 Forbidden

Forbidden

404 Not Found

Not Found

500 Internal Server Error

Internal Server Error

Other Status Codes

Method Not Allowed

Definitions

ConsumeRecord

List of consumer records

Name Type Description
key

string

Key for consumer record

offset

integer (int64)

Offset for consumer record

partition

integer (int32)

Partition ID for consumer record

timestamp

integer (int64)

Timestamp for consumer record

timestampType

string

Timestamp type for consumer record such as log append time or create time

value

string

Value for consumer record