From 011cbe16670610f9fb4f301abd49ae082fa9787b 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 165e8e2..29d827a 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; @@ -87,7 +88,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