All kafka listeners was restared every minute. But only broken ones should be restarted.
This would lead to lost data.
Signed-off-by: PatrikBuhr <patrik.buhr@est.tech>
Issue-ID: NONRTRIC-703
Change-Id: I876f946b0de73f39ada5a975a5e325a3952ae744
public synchronized void restartNonRunningTopics() {
for (String typeId : this.consumers.keySet()) {
for (KafkaJobDataConsumer consumer : this.consumers.get(typeId)) {
- restartTopic(consumer);
+ if (!consumer.isRunning()) {
+ restartTopic(consumer);
+ }
}
}
}