copy message key from consumed to produced record

Signed-off-by: Sebastian Schüpbach's avatarSebastian Schüpbach <sebastian.schuepbach@unibas.ch>
parent 13181aeb
Pipeline #19759 passed with stages
in 4 minutes and 15 seconds
......@@ -111,7 +111,7 @@ class KafkaTopology(
}
var producerRecord: ProducerRecord<String, String> =
ProducerRecord(outputTopic, event.eventId, modelString)
ProducerRecord(outputTopic, it.key(), modelString)
if (headerData.containsKey("institutionId")) {
producerRecord.headers().add("institutionId", headerData["institutionId"]?.toByteArray())
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment