All Products
Document Center


Last Updated: Apr 01, 2019


You can call this operation to reset a consumer offset to a specified timestamp for a specified group ID.


The operation is used to clear accumulated messages or trace back consumption. You can clear accumulated messages in two modes.

  • Clear all accumulated messages.

  • Reset the consumption progress to the specified time.

Request parameters

Name Type Required Description
InstanceId String No The ID of the instance.
PreventCache Long Yes The parameter used for CSRF verification, which can be set to the current system time. Unit: ms
ConsumerId String Yes The group ID of the consumer you want to query.
Topic String Yes The name of the topic for which the offset needs to be reset.
Type Integer Yes The message clearing type. Valid values:
  • 0: Clear all messages.
  • 1: Clear the message consumption progress to the specified time.
ResetTimestamp Long false The parameter used to reset the message consumption progress to a specified timestamp, which is valid only when Type is set to 1.

Response parameters

Name Type Description
RequestId String A common parameter. Each request has a unique ID.
HelpUrl String A help link.


For more information about sample codes, see API sample code and endpoints.