- log.debug("Storing data, last commit: {}", lastCommit);
- partitions.forEach(partition -> stateRepository.save(
- new StateDocument(
+ partitions
+ .stream()
+ .forEach(partition ->
+ {
+ log.info("{} - persisting state & offset for partition: {}", id, partition);
+ Map<String, AdderResult> state = recordHandler.getState(partition).getState();
+ Long offset = consumer.position(new TopicPartition(topic, partition));
+ log.info(
+ "{} - offset of next unseen message for partition {} is {}",
+ id,
+ partition,
+ offset);
+ for (String user : state.keySet())
+ {
+ log.info(
+ "{} - Saved state for partition={}|user={}: {}",
+ id,