gaozhangmin opened a new issue #13661:
URL: https://github.com/apache/pulsar/issues/13661
## Motivation
Pulsar should support auto commit offset by client itself like what KAFKA
did.
## Goal
Consumer support config `autoAckEnabled` and `autoAckIntervalMs` which
control auto acknowledge enabled or not and the time duration between two acks.
## Implementation
ConsumerConfigurationData add three new configuration
```
autoAckEnabled=false
autoAckIntervalMs=5000
```
```
private void maybeAutoCommitOffsetsAsync(long now) {
if (autoCommitEnabled) {
}
}
private void maybeAutoCommitOffsetsSync(long timeoutMs) {
if (autoCommitEnabled) {
}
}
```
When `consumer.receive()` We check if auto ack needed. Here, We call
`maybeAutoCommitOffsetsAsync`
When `consumer.close` We call `maybeAutoCommitOffsetsSync`, make sure all
the consumed offset committed to pulsar successfully
## Reject Alternatives
none
--
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]