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:
efa9423
)
Der Producer erkennt die Ă„nderung der Partitionierung schneller
author
Kai Moritz
<kai@juplo.de>
Sat, 2 Apr 2022 17:37:01 +0000
(19:37 +0200)
committer
Kai Moritz
<kai@juplo.de>
Sat, 2 Apr 2022 17:37:01 +0000
(19:37 +0200)
* `metadata.max.age.ms` auf 1000 heruntergesetzt (Default 5 min)
* Dadurch wird die Ă„nderung der Anzahl an Partitionen zeitnah erkannt
src/main/java/de/juplo/kafka/EndlessProducer.java
patch
|
blob
|
history
diff --git
a/src/main/java/de/juplo/kafka/EndlessProducer.java
b/src/main/java/de/juplo/kafka/EndlessProducer.java
index
7a5b324
..
8b3743d
100644
(file)
--- a/
src/main/java/de/juplo/kafka/EndlessProducer.java
+++ b/
src/main/java/de/juplo/kafka/EndlessProducer.java
@@
-41,6
+41,7
@@
public class EndlessProducer implements Runnable
props.put("bootstrap.servers", bootstrapServer);
props.put("client.id", clientId);
props.put("acks", acks);
+ props.put("metadata.max.age.ms", "1000");
props.put("key.serializer", StringSerializer.class.getName());
props.put("value.serializer", StringSerializer.class.getName());