RivenSun2 edited a comment on pull request #11340:
URL: https://github.com/apache/kafka/pull/11340#issuecomment-942858528


   @guozhangwang 
   Thank you for your reply
   1. I agree that deleting the poll(long) method will make the code changes 
easier, but this cannot solve the root cause, `time.timer(rebalanceTimeoutMs)` 
is applied to the offsetCommitTimer in `onJoinPrepare`.
   
   2. The new parameter `max.offset.auto.commit.in.rebalance.ms` I mentioned is 
**only used** in `onJoinPrepare` instead of `time.timer(rebalanceTimeoutMs)`. 
In fact, the `consumer.commitSync` will not call 
`maybeAutoCommitOffsetsSync(Timer timer)` .If other callers call 
`commitOffsetsSync`, the timer can keep the status quo.
     ```
    protected void onJoinPrepare(int generation, String memberId) {
           // commit offsets prior to rebalance if auto-commit enabled
           maybeAutoCommitOffsetsSync(time.timer(rebalanceTimeoutMs));
     .....
        }
   ```
   
   3. Do we have to choose a synchronous method for submitting the offset in 
onJoinPrepare? Can we  provide parameters for the customer to choose 
synchronous or asynchronous? It is just a suggestion.


-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to