lburgazzoli commented on issue #617: Build time Camel service resolution URL: https://github.com/apache/camel-quarkus/issues/617#issuecomment-574084930 > In general, I do not mind prefering the Camel registry. It is there and can serve the purpose of instantiating services well. > > The problem I am trying to solve here is, that we (camel-quarkus) still have code assuming that the FactoryFinders work well (incl. native), which they currently don't. I see several options how to fix that: > > A. Brute force: always add all service property files to the native image and keep using `DefaultFactoryFinderResolver` / `DefaultFactoryFinder` which read the files at runtime. > > B. Totally avoid using FactoryFinders. Provide an exception throwing FactoryFinder to make sure that our extensions do not use it at all. I am not sure this is possible and I am not sure this is a good idea, because third party extensions may still assume the FactoryFinders work. > > C. My original proposal: Custom FactoryFinder assembled at build time, no need to include the property files in the native image. The problem I see here is: what services do you add to the new factory finder "map" and what do you add to the registry ? I guess at the end we do end up having the same service registered to different "registries", because we do not know what is the patter 3th party libraries are using, isn't it ? May be we should have the factory finder to hooks into the registry or move every discovered service from the camel registry to the factory finder (but this requires some other changes in the FastCamelContext) > Both A. and C. sound like acceptable solutions to me, C. being more in accordance with the spirit of Quarkus. An intermediate solution would be to have an option to 1. store the service files in the native image 2. have the factory finder to emit a warning when it loads from a file > WDYT?
---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
