From 8d86d4cf9fdaa45bae606c633736c470b6aeb0e7 Mon Sep 17 00:00:00 2001 From: maura fortino Date: Tue, 27 Aug 2024 13:30:24 -0400 Subject: [PATCH] updated AddMessageHeaders --- internal/sink/sink.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/internal/sink/sink.go b/internal/sink/sink.go index 6b388168..30bcd5c2 100644 --- a/internal/sink/sink.go +++ b/internal/sink/sink.go @@ -456,9 +456,10 @@ func AddMessageHeaders(kafkaMsg *sarama.ProducerMessage, m *wrp.Message) { }) } - // for _, v := range m.Headers { - // h.Add(HeadersHeader, v) - // } + kafkaMsg.Headers = append(kafkaMsg.Headers, sarama.RecordHeader{ + Key: []byte(wrphttp.HeadersHeader), + Value: []byte(strings.Join(m.Headers, ",")), + }) if len(m.ServiceName) > 0 { kafkaMsg.Headers = append(kafkaMsg.Headers, sarama.RecordHeader{