Skip to content

Commit

Permalink
updated AddMessageHeaders
Browse files Browse the repository at this point in the history
  • Loading branch information
maurafortino committed Aug 27, 2024
1 parent 1d151f5 commit 8d86d4c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions internal/sink/sink.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down

0 comments on commit 8d86d4c

Please sign in to comment.