From 0f0d035e62ec8035809108c2881065d24ca1b62d Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Sun, 31 Jan 2021 16:51:59 +0100 Subject: [PATCH] Moved the name of the header for the sequence-number into a static field --- .../java/de/juplo/kafka/outbox/delivery/OutboxProducer.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/delivery/src/main/java/de/juplo/kafka/outbox/delivery/OutboxProducer.java b/delivery/src/main/java/de/juplo/kafka/outbox/delivery/OutboxProducer.java index 09c8789..2ad4b7e 100644 --- a/delivery/src/main/java/de/juplo/kafka/outbox/delivery/OutboxProducer.java +++ b/delivery/src/main/java/de/juplo/kafka/outbox/delivery/OutboxProducer.java @@ -25,6 +25,7 @@ public class OutboxProducer { final static Logger LOG = LoggerFactory.getLogger(OutboxProducer.class); + public final static String HEADER = "#"; private final OutboxRepository repository; private final KafkaProducer producer; @@ -68,7 +69,7 @@ public class OutboxProducer new ProducerRecord<>(topic, item.getKey(), item.getValue()); sequenceNumber = item.getSequenceNumber(); - record.headers().add("SEQ#", Longs.toByteArray(sequenceNumber)); + record.headers().add(HEADER, Longs.toByteArray(sequenceNumber)); producer.send(record, (metadata, e) -> { -- 2.20.1