New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CAMEL-19308: Add minimal support of native mode #857
Conversation
I wonder if the SB aot stuff can be in its own module in core, eg core/camel-spring-boot-aot |
Well, it depends on what is your objective behind? Technically speaking it is of course doable, but in practice, you will need to do the same for each existing starter which means twice more modules to build/publish/test/maintain/release... Moreover, if I did it like this it is because it is how it is done in Spring / Spring Boot, the aot code is a specific package in each module as you can see by yourself for example for spring-beans https://github.com/spring-projects/spring-framework/tree/main/spring-beans/src/main/java/org/springframework/beans/factory/aot |
Related ticket created in Spring spring-projects/spring-framework#30654 |
8562d4f
to
611a74f
Compare
611a74f
to
92f34ac
Compare
@davsclaus Is it ok as it is, or would you prefer a dedicated module for AOT? |
Yeah its okay. However I am just concerned that maintaining this can be causing pain with graalvm changes and mysterious aot issues. The quarkus team have spent endless time with all of this. And the outcome is that < 1% uses this today. BTW for XML DSL then use camel-xml-io instead of jaxb based, then its fast and light OOTB and dont need any AOT magic. The JAXB is legacy and hopefully in Camel v5 we can remove JAXB DSLs |
Oups, good catch, I forgot it, let me retry with |
Where you would need jaxb is if you use Spring XML files, eg |
I confirm that it works properly with |
fix for https://issues.apache.org/jira/browse/CAMEL-19308
Motivation
Spring Boot 3 proposes the native mode out of the box, we would like to allow Camel SB users to leverage this new feature to build native images from routes written using the Java, XML, and/or YAML DSL.
Modifications:
Result
Simple routes (without complex components) written in Java, XML, and YAML DSL can be compiled and launched in native mode.
JVM mode
8 routes (a mix of Java, XML, and YAML) started in a little bit less than 3 seconds
Native mode
8 routes (a mix of Java, XML, and YAML) started in a little bit more than 300 milliseconds