Resetting Consumer Group Offset to the Specified Position
Function
Kafka instances do not support resetting the consumer offset online. Before resetting, stop the client for which the offset is to be reset.
After a client is stopped, the server considers the client offline only after the time period specified in ConsumerConfig.SESSION_TIMEOUT_MS_CONFIG (10,000 ms by default).
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions. For details about the required permissions, see Permissions Policies and Supported Actions.
URI
PUT /v2/{engine}/{project_id}/mqs/instances/{instance_id}/groups/{group_id}/reset-message-offset
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Project ID |
| instance_id | Yes | String | Instance ID. |
| engine | Yes | String | Engine type. |
| group_id | Yes | String | Consumer group ID |
Request Parameters
Response Parameters
Status code: 204
| Parameter | Type | Description |
|---|---|---|
| - | String | Reset successfully. |
Example Requests
-
POST https://{endpoint}/v2/{engine}/{project_id}/instances/{instance_id}/groups/{group_id}/reset-message-offset { "topic" : "test", "partition" : 0, "message_offset" : 10 } -
POST https://{endpoint}/v2/{engine}/{project_id}/instances/{instance_id}/groups/{group_id}/reset-message-offset { "topic" : "test", "partition" : 0, "timestamp" : 1571812144000 }
Example Responses
None
Status Codes
| Status Code | Description |
|---|---|
| 204 | Operation successful. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot