Skip to content

Commit

Permalink
fix: use fdkId as key to make sure all events of the same resource ar…
Browse files Browse the repository at this point in the history
…e stored in the same partition
  • Loading branch information
jeffreiffers committed Nov 22, 2024
1 parent 8b0302e commit d4407f2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class KafkaMqaEventProducer(
private val kafkaTemplate: KafkaTemplate<String, MQAEvent>
) {
fun sendMQAEvent(mqaEvent: MQAEvent) {
kafkaTemplate.send("mqa-events", mqaEvent).handle { result, exception ->
kafkaTemplate.send("mqa-events", mqaEvent.fdkId.toString(), mqaEvent).handle { result, exception ->
if (exception != null) {
LOGGER.error("Error sending MQA event: " + exception.message)
Metrics.counter("produced_messages", "status", "error").increment()
Expand Down

0 comments on commit d4407f2

Please sign in to comment.