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 2018/02/11 10:13:41 UTC

[GitHub] XiaoZYang opened a new pull request #1219: Xzy initialize subscription config

XiaoZYang opened a new pull request #1219: Xzy initialize subscription config
URL: https://github.com/apache/incubator-pulsar/pull/1219
 
 
   ### Motivation
   
   This is a fix try for [Issue 1069](https://github.com/apache/incubator-pulsar/issues/1069), which expects a setting in consumer configuration to specify where to start consuming messages.
   
   
   ### Modifications
   1. add configuration option *initializeSubscriptionOnLatest* to class ConsumerConfiguration
   2. add an overload method for `asyncOpenCursor` in `ManageLedger` to implement different initalization position of the cursor created.
   3. modify corresponding testing class
   ### Result
   
   When a user subscribes a topic the first time, the broker will initialize the cursor the subscription on latest or earliest, which depends on the configuration option  "initializeSubscriptionOnLatest" in class ConsumerConfiguration.
   
   For more details, if user set the option "initializeSubscriptionOnLatest" to "false" when creating a new subscription the cursor will be set at the earliest position, otherwise (user doesn't set it explicitly -- use the default value or user set it to "true") at the latest position.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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