BewareMyPower commented on a change in pull request #12032:
URL: https://github.com/apache/pulsar/pull/12032#discussion_r717234322



##########
File path: 
pulsar-client-api/src/main/java/org/apache/pulsar/client/api/Consumer.java
##########
@@ -599,6 +599,15 @@
      */
     void seek(long timestamp) throws PulsarClientException;
 
+
+    /**
+     * Reset the subscription associated with this consumer to a specific 
message index.
+     *
+     * @param index
+     *            the message index where to reposition the subscription
+     */

Review comment:
       We should define the behavior for corner cases. For example, if there're 
10 messages in a topic, i.e. the offset range varies from 0 to 9. What will 
happen if the given index is -1 or 10?
   
   There is another corner case. If the offset range is `[10, 20)`, the oldest 
messages (`[0, 10)`) have been deleted. What will happen if the given index is 
less than 10?
   
   BTW, it's a change for public API. I think we need a PIP first. /cc 
@merlimat 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to