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:
a6ae559
)
Implementierung des Versands der Header ergänzt
author
Kai Moritz
<kai@juplo.de>
Thu, 15 Jun 2023 20:54:54 +0000
(22:54 +0200)
committer
Kai Moritz
<kai@juplo.de>
Sat, 17 Jun 2023 16:40:22 +0000
(18:40 +0200)
src/main/java/de/juplo/kafka/RestProducer.java
patch
|
blob
|
history
diff --git
a/src/main/java/de/juplo/kafka/RestProducer.java
b/src/main/java/de/juplo/kafka/RestProducer.java
index
0158774
..
e68fe66
100644
(file)
--- a/
src/main/java/de/juplo/kafka/RestProducer.java
+++ b/
src/main/java/de/juplo/kafka/RestProducer.java
@@
-57,6
+57,12
@@
public class RestProducer
value // Value
);
+ record.headers().add("source", id.getBytes());
+ if (correlationId != null)
+ {
+ record.headers().add("id", BigInteger.valueOf(correlationId).toByteArray());
+ }
+
producer.send(record, (metadata, e) ->
{
long now = System.currentTimeMillis();