From 0cff762e765c72b941900d033bb822829f7940ae Mon Sep 17 00:00:00 2001 From: soharab-ic <156293296+soharab-ic@users.noreply.github.com> Date: Wed, 23 Oct 2024 21:50:37 +0530 Subject: [PATCH] In case of duplicate headers, headers from kafka-message should be retained (#170) --- kafka-http-connector/main.go | 2 +- kafka-http-connector/version | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/kafka-http-connector/main.go b/kafka-http-connector/main.go index 86c3d37..c9d17f0 100644 --- a/kafka-http-connector/main.go +++ b/kafka-http-connector/main.go @@ -220,7 +220,7 @@ func (conn *kafkaConnector) ConsumeClaim(session sarama.ConsumerGroupSession, cl // Set the headers came from Kafka record for _, h := range message.Headers { if utf8.ValidString(string(h.Value)) { - headers.Add(string(h.Key), string(h.Value)) + headers.Set(string(h.Key), string(h.Value)) } } diff --git a/kafka-http-connector/version b/kafka-http-connector/version index 2b8bac3..d314dc4 100644 --- a/kafka-http-connector/version +++ b/kafka-http-connector/version @@ -1 +1 @@ -v0.17 +v0.18