tarunannapareddy opened a new pull request, #17577:
URL: https://github.com/apache/pulsar/pull/17577

   <!--
   ### Contribution Checklist
     
     - PR title format should be *[type][component] summary*. For details, see 
*[Guideline - Pulsar PR Naming 
Convention](https://docs.google.com/document/d/1d8Pw6ZbWk-_pCKdOmdvx9rnhPiyuxwq60_TrD68d7BA/edit#heading=h.trs9rsex3xom)*.
 
   
     - Fill out the template below to describe the changes contributed by the 
pull request. That will give reviewers the context they need to do the review.
     
     - Each pull request should address only one issue, not mix up code from 
multiple issues.
     
     - Each commit in the pull request has a meaningful commit message
   
     - Once all items of the checklist are addressed, remove the above text and 
this checklist, leaving only the filled out template below.
   -->
   
   <!-- Either this PR fixes an issue, -->
   
   Fixes #17574 
   
   <!-- or this PR is one task of an issue -->
   
   Master Issue: #17574 
   
   ### Motivation
   Email from Yunze Xu
   
   Assuming users called "acknowledgeCumulative" periodically, there is a 
chance that some messages of the specific partition has never been passed to 
the method.
   For example, a consumer received: P0-M0, P1-M0, P0-M1, P1-M1, P0-M2, P1-M2...
   And the user acknowledged every two messages, i.e. P0-M0, P0-M1, P0-M2. 
Eventually, partition 1 has never been acknowledged. User must maintain its own 
`Map<String, MessageId&gt> cache for a partitioned topic or multi-topics 
consumer with the existing "acknowledgeCumulative" API.
   
   Should we make it more friendly for users? For example, we can make 
"acknowledgeCumulative" accept the map to remind users to maintain the map from 
topic name to message ID:
   java
   
    // the key is the partitioned topic name like my-topic-partition-0
    void acknowledgeCumulative(Map<String, MessageId> topicToMessageId);
   
   ### Modifications
   add support for acknowledgeCumulative(Map<String, MessageId> 
topicToMessageId)
   
   ### Verifying this change
   This change added tests and can be verified as follows::
   org/apache/pulsar/client/api/ConsumerCumulativeAckMapTest.java
   
   ### Documentation
   
   - [ ] `doc-not-needed` 
   


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