From 7582477ebe3527b6b09ae930d6411d389b7567d5 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Mon, 12 Jun 2023 20:48:27 +0200 Subject: [PATCH] =?utf8?q?Implementierung=20zum=20Anf=C3=BCgen=20der=20Hea?= =?utf8?q?der=20wiederhergestellt?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/main/java/de/juplo/kafka/RestProducer.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/de/juplo/kafka/RestProducer.java b/src/main/java/de/juplo/kafka/RestProducer.java index 73bec5b..cecb980 100644 --- a/src/main/java/de/juplo/kafka/RestProducer.java +++ b/src/main/java/de/juplo/kafka/RestProducer.java @@ -42,6 +42,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(); -- 2.20.1