Help Center/ Distributed Message Service/ User Guide/ Managing Queues and Messages/ Resetting Message Retrieval Start Position
Updated on 2022-09-05 GMT+08:00

Resetting Message Retrieval Start Position

Scenario

Reset the message retrieval start position if you want to skip certain messages that are never retrieved, or retrieve certain messages again, or retrieve only the messages later than a certain point in time regardless of whether these messages have been retrieved.

You can start message retrieval:

  • From the beginning of the chosen queue

    All messages in the queue are retrieved again, regardless of whether they have been retrieved.

  • From the end of the chosen queue

    All messages in the queue are skipped. Only the messages right after the new retrieval start position will be retrieved.

  • From a specified point in time

    Only the messages in the queue that are later than a specified point time are retrieved.

After the retrieval start position is reset, messages ahead of the new retrieval start position will be flagged as retrieved messages, regardless of whether they have been retrieved.

Prerequisites

A queue has been created. The queue has at least one consumer group and the consumer group has retrieved messages.

Procedure

  1. Log in to the management console.
  2. Click in the upper left corner of the management console and select a region.

    Select the same region as your application service.

  3. Click Service List, and choose Application > Distributed Message Service to open the DMS console.
  4. In the navigation pane, choose Queue Manager.
  5. Click the name of a queue for which you want to reset the message retrieval start position.
  6. On the queue details page, click the Consumer Groups tab.
  7. In the consumer group list, choose More > Reset Retrieval Start Position in the same row as the consumer group for which you want to reset the message retrieval start position.
  8. Specify Start Message Retrieval and Force Reset parameters. Click OK.

    Table 1 Parameter description

    Parameter

    Description

    Start Message Retrieval

    • From beginning of queue

      The consumer group starts retrieving messages from the beginning of the queue.

    • From a specified point in time

      The consumer group starts retrieving messages from a specified point in time.

    • From end of queue

      The consumer group starts retrieving messages from the end of the queue. This means that the consumer group retrieves the messages newly sent into the queue.

    Default value: From beginning of queue

    Start Point

    The message retrieval start time must fall within the message retention period (up to 72 hours). This parameter is mandatory only if Start Message Retrieval is set to From a Specified Point in Time.

    Force Reset

    Disable

    If messages are currently being retrieved, the reset will fail.

    Enable

    The retrieval start position will be reset even if messages are currently being retrieved. This may cause the message retrieval in progress to fail.

    By default, this parameter is disabled.