Hello Camelers, Currently Spring Native is in the Beta phase <https://spring.io/blog/2021/03/11/announcing-spring-native-beta>. Since it is already in Beta, I thought it would be nice to explore how this can be integrated into camel-spring-boot when it is officially released.
Currently, you can actually already compile and run an existing using camel-spring-boot route using Spring Native AOT plugin and native-image. However, what it needs to be done, is that, you will need to supply the type hints that are needed for native-image AOT compiler manually or use the native-agent to generate hints based on the integration tests. Moving forward based on my small research, I think it will make sense if these hints are already included in the camel-spring-boot starters, for example the included Kafka clients hints <https://github.com/spring-projects-experimental/spring-native/blob/master/spring-native-configuration/src/main/java/org/springframework/kafka/annotation/KafkaHints.java> and therefore it will allow seamless experience to compile and run camel-spring-boot routes natively without supplying any extra type hints that are related to Camel when running in native mode. How to do it, here are some options that I could think of (please feel free to suggest any other ideas): - Create a maven plugin to camel-spring-boot to generate type hints for Camel core packages. - Add needed type hints for each component starter, this is going to be a manual process, similar to camel-quarkus process. Another idea is use to native-agent to generate the needed hints for the AOT compiler during the integration test, although this is the easiest way to do it, however it can be unreliable due to the fact that integration tests may not cover all the aspects of the components and thus missing important info that needed for the AOT compiler. What do you think? Any other ideas? Regards, -- Omar Al-Safi [email protected] https://blog.oalsafi.com
