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/03/13 02:37:57 UTC

[GitHub] zhaijack commented on issue #1219: Issue 1069: Provide a setting in consumer configuration to specify where to start consuming messages

zhaijack commented on issue #1219: Issue 1069: Provide a setting in consumer configuration to specify where to start consuming messages 
URL: https://github.com/apache/incubator-pulsar/pull/1219#issuecomment-372527172
 
 
   @XiaoZYang, Regarding the earliest position, there may be messages before it, but has been deleted. 
   Seems counter in getLastPositionAndCounter represent all added entries to this ledger, backlog == added_entry_counter - consumed_counter. In initializeCursorPosition(),  we set `messagesConsumedCounter = lastPositionCounter.second` so the backlog is 0. 
   
   While in this `getFirstPositionAndCounter`, we could make messagesConsumedCounter as value
   `ENTRIES_ADDED_COUNTER_UPDATER.get(this)  - getNumberOfEntries(Range.openClosed(firstPosition, lastPosition))`.
   
   Besides this, seems this need rebase, and fix the unit-test error. Thanks.

----------------------------------------------------------------
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