davsclaus commented on code in PR #8593:
URL: https://github.com/apache/camel/pull/8593#discussion_r1000446779


##########
components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConsumer.java:
##########
@@ -52,7 +53,7 @@ public class KafkaConsumer extends DefaultConsumer
     protected ExecutorService executor;
     private final KafkaEndpoint endpoint;
     private KafkaConsumerHealthCheck consumerHealthCheck;
-    private KafkaHealthCheckRepository healthCheckRepository;
+    private ComponentsHealthCheckRepository healthCheckRepository;

Review Comment:
   Can you use HealthCheckRepository API instead to avoid impl import



##########
components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaProducer.java:
##########
@@ -38,6 +38,7 @@
 import 
org.apache.camel.component.kafka.producer.support.PropagatedHeadersProvider;
 import org.apache.camel.component.kafka.serde.KafkaHeaderSerializer;
 import org.apache.camel.health.HealthCheckHelper;
+import org.apache.camel.impl.health.ComponentsHealthCheckRepository;

Review Comment:
   Same here as in the consumer



##########
components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConsumer.java:
##########
@@ -30,6 +30,7 @@
 import 
org.apache.camel.component.kafka.consumer.errorhandler.KafkaConsumerListener;
 import org.apache.camel.health.HealthCheckAware;
 import org.apache.camel.health.HealthCheckHelper;
+import org.apache.camel.impl.health.ComponentsHealthCheckRepository;

Review Comment:
   Avoid importing impl classes as they should not be used in the public



##########
components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConsumer.java:
##########
@@ -123,8 +124,11 @@ protected void doStart() throws Exception {
         super.doStart();
 
         // health-check is optional so discover and resolve
-        healthCheckRepository = 
HealthCheckHelper.getHealthCheckRepository(endpoint.getCamelContext(), 
"camel-kafka",
-                KafkaHealthCheckRepository.class);
+        healthCheckRepository = HealthCheckHelper.getHealthCheckRepository(

Review Comment:
   Lookup the repository without impl import



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to