You can reset consumer offsets to skip the accumulated or undesired messages and restart consumption. You can also consume messages after a specified point in time regardless of whether the messages before this point in time have been consumed.

Usage notes

When you reset consumer offsets, take note of the following items:

  • You cannot reset consumer offsets in broadcasting consumption mode.
  • You cannot reset consumer offsets by specifying a message ID, message key, or tag.
  • You can reset only the consumer offsets of a group ID in TCP mode in the MessageQueue for Apache RocketMQ console.

Procedure

  1. Log on to the Message Queue for Apache RocketMQ console.
  2. In the left-side navigation pane, click Instances.
  3. In the top navigation bar, select a region, for example, China (Hangzhou).
  4. On the Instances page, find the instance, click More in the Actions column, and then select Groups from the drop-down list.
  5. On the Groups page, click the TCP tab.
  6. Find the group ID for which you want to reset consumer offsets, click More in the Actions column, and then select Reset Consumer Offset from the drop-down list.mq.reset_consumer_site
  7. In the Reset Consumer Offset panel, select one of the following options based on your business requirements, and click OK.mq.reset_consumer_site_talk
    • Start Consumption from Latest Offset: If this option is selected, consumers in the group ID skip all accumulated (unconsumed) messages within the topic and restart consumption from the latest offset.

      However, if reconsumeLater is returned, the messages in the retry process cannot be skipped.

    • Start Consumption from Offset Corresponding to Specified Point in Time: If this option is selected, a time picker appears. Select a time. Only the messages that are sent after the selected time are consumed.

      The period allowed for the time picker ranges from the production time of the earliest message stored in the topic to the production time of the latest message stored in the topic. You can only select a time within the allowed time range.

FAQ

  • What can I do if I failed to reset the consumer offsets by using the preceding two methods?
    1. Check whether the clustering consumption mode is used. You cannot reset consumer offsets in broadcasting consumption mode.
    2. Check whether the consumer is in the Online state. The consumer must be online before you can reset the consumer offset.
    3. Check the SDK version. This issue may occur if the SDK version is too low. We recommend that you upgrade the SDK to the latest version. For example, SDK for Java in TCP mode must be 1.8.0.Final or later. For more information, see Release notes.
  • Why am I unable to skip accumulated messages after I reset consumer offsets?

    If you select Start Consumption from Latest Offset to reset the consumer offset, the messages in the retry process cannot be cleared. You can select Start Consumption from Offset Corresponding to Specified Point in Time instead to reset the consumer offset.