You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2019/05/22 19:14:15 UTC

[GitHub] [pulsar] merlimat commented on a change in pull request #4331: Feature - reset cursor on Reader to current position

merlimat commented on a change in pull request #4331: Feature - reset cursor on Reader to current position
URL: https://github.com/apache/pulsar/pull/4331#discussion_r286624635
 
 

 ##########
 File path: pulsar-client/src/main/java/org/apache/pulsar/client/impl/ReaderBuilderImpl.java
 ##########
 @@ -112,6 +112,13 @@ private ReaderBuilderImpl(PulsarClientImpl client, ReaderConfigurationData<T> co
         return this;
     }
 
+    @Override
+    public ReaderBuilder<T> startMessageIdInclusive(MessageId messageId) {
 
 Review comment:
   Since we're now forced to have 2 methods anyways (to not breaking compatibility), I'd prefer to keep the included/non-included as a flag, rather than a different option. eg: 
   
   ```
   client.newReader()
         .topic("my-topic")
         .startMessageId(myMessageId)
         .startMessageIdIncluded(true)
         .create();
   ```
   
   One other case to consider is with `MessageId.latest`. There we should be able to read the last 1 message in the topic.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services