From ab08c2f93b6d43f74cf4539fe581dd6d1082165b Mon Sep 17 00:00:00 2001 From: Marc-Andre Weber Date: Thu, 6 Jan 2022 09:16:16 +0100 Subject: [PATCH] #400 Adopted KafkaHandler constructor --- .../swisspush/gateleen/kafka/KafkaHandler.java | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/gateleen-kafka/src/main/java/org/swisspush/gateleen/kafka/KafkaHandler.java b/gateleen-kafka/src/main/java/org/swisspush/gateleen/kafka/KafkaHandler.java index e4e0b8d60..134e31d1c 100644 --- a/gateleen-kafka/src/main/java/org/swisspush/gateleen/kafka/KafkaHandler.java +++ b/gateleen-kafka/src/main/java/org/swisspush/gateleen/kafka/KafkaHandler.java @@ -58,21 +58,23 @@ public KafkaHandler(ConfigurationResourceManager configurationResourceManager, K public KafkaHandler(ConfigurationResourceManager configurationResourceManager, KafkaMessageValidator kafkaMessageValidator, KafkaProducerRepository repository, KafkaMessageSender kafkaMessageSender, String configResourceUri, String streamingPath) { - super(configurationResourceManager, configResourceUri, "gateleen_kafka_topic_configuration_schema"); - this.kafkaMessageValidator = kafkaMessageValidator; - this.repository = repository; - this.kafkaMessageSender = kafkaMessageSender; - this.streamingPath = streamingPath; - this.properties = new HashMap<>(); - - this.topicExtractor = new KafkaTopicExtractor(streamingPath); + this(configurationResourceManager, kafkaMessageValidator, repository, kafkaMessageSender, + configResourceUri, streamingPath, new HashMap<>()); } public KafkaHandler(ConfigurationResourceManager configurationResourceManager, KafkaProducerRepository repository, KafkaMessageSender kafkaMessageSender, String configResourceUri, String streamingPath, Map properties) { + this(configurationResourceManager, null, repository, kafkaMessageSender, + configResourceUri, streamingPath, properties); + } + + public KafkaHandler(ConfigurationResourceManager configurationResourceManager, KafkaMessageValidator kafkaMessageValidator, KafkaProducerRepository repository, + KafkaMessageSender kafkaMessageSender, String configResourceUri, String streamingPath, Map properties) { + super(configurationResourceManager, configResourceUri, "gateleen_kafka_topic_configuration_schema"); this.repository = repository; + this.kafkaMessageValidator = kafkaMessageValidator; this.kafkaMessageSender = kafkaMessageSender; this.streamingPath = streamingPath; this.properties = properties;