projects
/
demos
/
kafka
/
training
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ea7667e
)
Offset-Position in der MongoDB wird vor jedem `poll()` aktualisiert
author
Kai Moritz
<kai@juplo.de>
Wed, 6 Apr 2022 22:00:57 +0000
(
00:00
+0200)
committer
Kai Moritz
<kai@juplo.de>
Wed, 6 Apr 2022 22:11:49 +0000
(
00:11
+0200)
src/main/java/de/juplo/kafka/EndlessConsumer.java
patch
|
blob
|
history
diff --git
a/src/main/java/de/juplo/kafka/EndlessConsumer.java
b/src/main/java/de/juplo/kafka/EndlessConsumer.java
index
69c8294
..
b152310
100644
(file)
--- a/
src/main/java/de/juplo/kafka/EndlessConsumer.java
+++ b/
src/main/java/de/juplo/kafka/EndlessConsumer.java
@@
-135,6
+135,8
@@
public class EndlessConsumer implements Runnable
String key = record.key() == null ? "NULL" : record.key();
seen.get(partition).increment(key);
}
+
+ seen.forEach((tp, statistics) -> repository.save(new StatisticsDocument(statistics, consumer.position(tp))));
}
}
catch(WakeupException e)