aldettinger commented on a change in pull request #3594:
URL: https://github.com/apache/camel-quarkus/pull/3594#discussion_r823465100
##########
File path:
extensions/kafka/deployment/src/main/java/org/apache/camel/quarkus/component/kafka/deployment/KafkaProcessor.java
##########
@@ -68,4 +69,12 @@ public void configureKafkaComponentForDevServices(
}
}
}
+
+ @BuildStep
+ public ReflectiveClassBuildItem reflectiveClasses() {
+ return new ReflectiveClassBuildItem(false, true,
+ "org.apache.kafka.clients.producer.KafkaProducer",
+ "org.apache.kafka.clients.consumer.KafkaConsumer",
+ "org.apache.kafka.clients.producer.internals.Sender");
+ }
Review comment:
About knowing whether registering the class for reflection is useful.
The best I can see is to have it covered in a native test.
About knowing whether using reflection is really needed in camel-kafka.
`kafkaProducer.getClass()` might return
`org.apache.kafka.clients.producer.KafkaProducer` most of the time which has
field `clientId`.
@davsclaus: Could we safely assume that `kafkaProducer.getClass()` always
returns `org.apache.kafka.clients.producer.KafkaProducer`
[here](https://github.com/apache/camel/blob/main/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaProducer.java#L170..L171)
? What happen if someone change the implementation by using the
[setter](https://github.com/apache/camel/blob/main/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaProducer.java#L138)
?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]