1
0
mirror of https://github.com/pcvolkmer/etl-processor.git synced 2025-04-19 17:26:51 +00:00

fix: add message key value while producing messages to kafka topic

This commit is contained in:
Jakub Lidke 2023-07-26 12:28:03 +02:00
parent ed17a803bf
commit 0defbb05ba

View File

@ -33,7 +33,8 @@ class KafkaMtbFileSender(
override fun send(mtbFile: MtbFile): MtbFileSender.Response {
return try {
kafkaTemplate.sendDefault(objectMapper.writeValueAsString(mtbFile))
kafkaTemplate.sendDefault(String.format("{\"pid\": %s, \"eid\": %s}", mtbFile.patient.id,
mtbFile.episode.id), objectMapper.writeValueAsString(mtbFile))
logger.debug("Sent file via KafkaMtbFileSender")
MtbFileSender.Response(MtbFileSender.ResponseStatus.UNKNOWN)
} catch (e: Exception) {