apache / apache/rocketmq-connect
WorkerSourceTask commitOffset in sync mode
- Dominant language
- Java
- Stars
- 141
- Forks
- 120
- PR merge metrics
- No merged PRs in 30d
Description
WorkerSourceTask.java
```java
Future flushFuture = positionStorageWriter.doFlush((error, key, result) -> {
if (error != null) {
log.error("{} Failed to flush offsets to storage: ", WorkerSourceTask.this, error);
} else {
log.trace("{} Finished flushing offsets to storage", WorkerSourceTask.this);
}
});
try {
flushFuture.get(Math.max(timeout - System.currentTimeMillis(), 0), TimeUnit.MILLISECONDS);
}
```
WorkerSourceTask.commitOffsets will be called sync at each message, it's harmful to performance. IMO, we can use async to commitOffset.
Contributor guide
Assessment
This issue has not been assessed yet.