edit-icon download-icon

Reset consumer offset

Last Updated: Dec 21, 2018

If you want to skip accumulated messages, which means that you do not want to consume those messages, or if you want to consume only the messages sent after a certain time point regardless of whether they have been consumed or not, you can reset the messages’ consumer offset. The specific steps are as follows:

  1. In the left-side navigation pane of the MQ console, click Consumers.
  2. Find the consumer ID and topic for which you need to reset the consumer offset, and in the Actions column of that row, click More > Reset Consumer Offset.
  3. In the Reset Type area, select Skip All Accumulated Messages to Consume from the Latest One or Reset by Time Point according to your need. The instructions for the two options are as follows:

    • Skip All Accumulated Messages to Consume from the Latest One: If this option is selected, the consumer ID will skip all the accumulated (not consumed) messages under the topic, and consume from the latest one that is sent after the reset is complete.
      Note: It takes no effect on messages for which the system returns “reconsumeLater”, that is, the messages that are subjected to a retry procedure.

    • Reset by Time Point: If this option is selected, a time selection widget will appear. Select a specific time in the widget. Only the messages that are sent after the selected time will be consumed.
      The time scope available in the time selection widget ranges from the storage time of the earliest message of the topic to that of the latest message of the topic. If the selected time range falls out of the allowed time scope, the system processes such selection with the following logic:

      • If the selected start time is earlier than the allowed start time, the consumer offset is reset to the allowed start time.
      • If the selected end time is later than the allowed end time, the consumer offset is reset to the allowed end time.
  4. Click OK to reset the consumer offset.

Note: MQ does not support resetting consumer offsets by message ID, message key, or tag currently.

Thank you! We've received your feedback.