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 are consumed.

Considerations

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

  • You cannot reset consumer offsets in broadcasting consumption mode.
  • You cannot reset consumer offsets by specifying a message ID, message key, or tag.
  • In the Message Queue for Apache RocketMQ console, you can reset consumer offsets for only group IDs created for TCP.

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, such as China (Hangzhou).
  4. On the Instances page, find your instance, click More in the Actions column, and then select Groups.
  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. mq.reset_consumer_site
  7. In the Reset Consumer Offset panel, select one of the following options based on your business needs, and click OK. mq.reset_consumer_site_talk
    • Start Consumption from Latest Offset: If this option is selected, consumers of 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 point in time. Only the messages that are sent after the selected point in time will be 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 select only a point in time within the allowed time range.

Troubleshooting

  • What do I do if I failed to reset 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 current consumer is online. The consumer must be online before you can reset consumer offsets.
    3. Check the SDK version. This issue may occur if the SDK version is much earlier. We recommend that you update the SDK to the latest version. For example, TCP SDK for Java must be 1.8.0.Final or later. For more information, see Release notes.
  • Why are the consumer offsets for some messages are not reset after I reset consumer offsets to skip accumulated messages?

    The consumer offset reset feature does not take effect for messages in the retry process. Therefore, a small number of messages in the retry process are still delivered after you reset the consumer offsets.