From 1a7d2538b112764965c3ab347340c0de8e89eff8 Mon Sep 17 00:00:00 2001 From: Andreas Mautsch Date: Fri, 5 Jul 2024 08:21:37 +0200 Subject: [PATCH] kafka changes --- .../eventdispatcher/consumer/kafka/CalendarConsumer.java | 4 ++-- .../eventdispatcher/producer/EventProducerKafka.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/goafabric/eventdispatcher/consumer/kafka/CalendarConsumer.java b/src/main/java/org/goafabric/eventdispatcher/consumer/kafka/CalendarConsumer.java index c9a07ee..d7b9e5d 100644 --- a/src/main/java/org/goafabric/eventdispatcher/consumer/kafka/CalendarConsumer.java +++ b/src/main/java/org/goafabric/eventdispatcher/consumer/kafka/CalendarConsumer.java @@ -14,8 +14,8 @@ public class CalendarConsumer { static final String CONSUMER_NAME = "Calendar"; - @KafkaListener(groupId = CONSUMER_NAME, - topics = {"patient.create", "patient.update", "preactitioner.create", "practitioner.update"}) + @KafkaListener(groupId = CONSUMER_NAME, topics = {"patient.create", "patient.update"}) + @KafkaListener(groupId = CONSUMER_NAME, topics = {"practitioner.create", "practitioner.update"}) public void processKafka(@Header(KafkaHeaders.RECEIVED_TOPIC) String key, EventData eventData) { process(key, eventData); } diff --git a/src/main/java/org/goafabric/eventdispatcher/producer/EventProducerKafka.java b/src/main/java/org/goafabric/eventdispatcher/producer/EventProducerKafka.java index 7e8a348..4ecdf6f 100644 --- a/src/main/java/org/goafabric/eventdispatcher/producer/EventProducerKafka.java +++ b/src/main/java/org/goafabric/eventdispatcher/producer/EventProducerKafka.java @@ -27,8 +27,8 @@ public void produce(ChangeEvent changeEvent) { changeEvent.referenceId()); } - private void send(String key, String referenceId) { - kafkaTemplate.send(key, new EventData(referenceId)); + private void send(String topic, String referenceId) { + kafkaTemplate.send(topic, referenceId, new EventData(referenceId)); } }