Search code examples
javaapache-pulsarpulsarpython-pulsar

Replay / Reset messages in Apache Pulsar


Is it possible to replay old messages (within retention period)? There is no documentation about it. I would like to do this based on a timestamp or period.

A hint in the right direction would be much appreciated.


Solution

  • I found the answer by manually going through the Admin client:

     adminClient.topics().resetCursor("topictest", "sub-1", milis);
    

    You can reset/replay for all consumers/subscribers by first retrieving a list of the subscribers:

    adminClient.topics().getSubscriptions("topictest")