jomin7 commented on code in PR #8684:
URL: https://github.com/apache/camel-quarkus/pull/8684#discussion_r3337472532


##########
extensions-support/debezium/deployment/src/main/java/org/apache/camel/quarkus/support/debezium/deployment/DebeziumSupportProcessor.java:
##########
@@ -144,6 +142,18 @@ void reflectiveClasses(CombinedIndexBuildItem 
combinedIndex, BuildProducer<Refle
                 SchemaTopicNamingStrategy.class,
                 FileSchemaHistory.class)
                 .build());
+
+        reflectiveClasses.produce(ReflectiveClassBuildItem.builder(
+                "org.apache.kafka.connect.converters.ByteArrayConverter",
+                "org.apache.kafka.connect.converters.BooleanConverter",
+                "org.apache.kafka.connect.converters.DoubleConverter",
+                "org.apache.kafka.connect.converters.FloatConverter",
+                "org.apache.kafka.connect.converters.IntegerConverter",
+                "org.apache.kafka.connect.converters.LongConverter",
+                "org.apache.kafka.connect.converters.ShortConverter")
+                .constructors()
+                .methods()
+                .build());

Review Comment:
   Thanks @jamesnetherton, I looked into using the Jandex index for this. The 
Converter implementations (ByteArrayConverter, BooleanConverter, etc.) live in 
connect-runtime. Indexing that jar via IndexDependencyBuildItem causes both CDI 
and RESTEasy to discover its internal JAX-RS resource classes (like 
InternalConnectResource), which blows up with unsatisfied constructor 
dependencies. ExcludedTypeBuildItem only covers CDI, and since RESTEasy 
independently scans the Jandex index for @Path classes, there's no way to 
selectively hide them from it.
   
   As an alternative, I'm replacing the manual list with a build-time scan of 
the META-INF/services/org.apache.kafka.connect.storage.Converter service loader 
files from the classpath. This gets us the exact same result—no hardcoded list, 
auto-discovery of all implementations, and forward compatibility with future 
Kafka versions—but without needing to index connect-runtime at all.
   
   Does that approach sound good to you?



-- 
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]

Reply via email to