- Map<String, Long> removed = recordHandler.removePartition(partition);
- stateRepository.save(new StateDocument(partition, removed, offset));
+ if (commitsEnabled)
+ {
+ Map<String, Long> removed = recordHandler.removePartition(partition);
+ stateRepository.save(new StateDocument(partition, removed, offset));
+ }
+ else
+ {
+ log.info("Offset commits are disabled! Last commit: {}", lastCommit);
+ }