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.
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.
- Log on to the Message Queue for Apache RocketMQ console.
- In the left-side navigation pane, click Instances.
- In the top navigation bar, select a region, such as China (Hangzhou).
- On the Instances page, find your instance, click More in the Actions column, and then select Groups.
- On the Groups page, click the TCP tab.
- Find the group ID for which you want to reset consumer offsets, click More in the Actions column, and then select Reset Consumer Offset.
- In the Reset Consumer Offset panel, select one of the following options based on your business needs, and click
- 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.
reconsumeLateris 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.
- 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.
- What do I do if I failed to reset consumer offsets by using the preceding two methods?
- Check whether the clustering consumption mode is used. You cannot reset consumer offsets in broadcasting consumption mode.
- Check whether the current consumer is online. The consumer must be online before you can reset consumer offsets.
- 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.