GitHub user merajblueshift edited a discussion: Behavior of reset cursor API

Hello
I have a question on the below API
```
https://pulsar.apache.org/admin/v2/non-persistent/{tenant}/{namespace}/{topic}/subscription/{subName}/resetcursor/{timestamp}
```
Is the timestamp corresponding to when the message was pushed into the topic.
So for example at 3PM if the topic already has a backlog of 6 hours (from 9AM 
and 6000 documents let us say, 1000 for each hour) and I reset to 1PM. What 
will happen. Will backlog stay as 6000? Or will it come down to 2000.

I know if I reset by relative position, for example 6 hours, last 6 hours of 
consumed messages are again given to the consumer.
So with reset using absolute timestamp, can the cursor also be moved forward on 
a topic which has backlog?

Also with pulsar admin cli I see option to reset by relative time, but same 
option is not available with REST API
```
Reset position for subscription to a position that is closest to timestamp or 
messageId.

Usage


$ pulsar-admin topics reset-cursor topic options


Options

Flag    Description     Default
-s, --subscription      Subscription to reset position on       
-t, --time      The time in minutes to reset back to (or minutes, hours, days, 
weeks, etc.). Examples: 100m, 3h, 2d, 5w.        
-m, --messageId The message ID to reset back to (ledgerId:entryId or earliest 
or latest). 
```

GitHub link: https://github.com/apache/pulsar/discussions/21145

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]

Reply via email to