Chapter 3. Upgrading to Red Hat build of Camel Spring Boot 4.14
When you upgrade from Red Hat build of Camel Spring Boot version 4.10 to version 4.14, consider the following.
3.1. Narayana Copy linkLink copied to clipboard!
If you are using dev.snowdrop:narayana-spring-boot-starter and you want to use the JMS connection pool.
Explicitly define
org.messaginghub:pooled-jmsin your project.It is optional and not a transitive dependency. Red Hat build of Camel Spring Boot version 4.14.x uses Narayana 3.5.0.
Explicitly declare
pooled-jmsin addition to the narayana starter. The version is managed by the CSB maven BOM:<dependency> <groupId>dev.snowdrop</groupId> <artifactId>narayana-spring-boot-starter</artifactId> </dependency> <dependency> <groupId>org.messaginghub</groupId> <artifactId>pooled-jms</artifactId> </dependency>
3.2. HTTP or CXFrs component producers Copy linkLink copied to clipboard!
If you have one or both of these:
-
An
httpcomponent producer with bridgeEndpoint coming from another http request. -
An
cxfrscomponent producer coming from another http request.
you must use .removeHeader(Exchange.HTTP_PATH) in the routes:
Add
.removeHeader(Exchange.HTTP_PATH)in the routes:Example: remove
CamelHttpPathheaderrest() .get("/my-fe") .to("direct:fe") .get("/my-be") .to("direct:be"); from("direct:fe").routeId("fe") .removeHeader(Exchange.HTTP_PATH) .to("http://localhost:8080/my-be?bridgeEndpoint=true"); from("direct:be").routeId("be") .log("${headers}");
In the above route, calling the exposed /my-fe endpoint, the http component as producer will try to call http://localhost:8080/my-be/my-fe endpoint since it will append /my-fe to the declared producer endpoint. The workaround is to remove the CamelHttpPath header.
3.3. Changed configuration properties Copy linkLink copied to clipboard!
Configuration properties have been reorganized in Camel Spring Boot 4.14.
Properties have been migrated between the camel.springboot.* and camel.main.* namespaces, and HTTP management-related properties have been moved from camel.server.* to camel.management.* to better separate management services from business services.
When migrating from Red Hat build of Camel Spring Boot 4.10 to 4.14, you need to update your application configuration properties as follows:
| Old Property (4.10) | New Property (4.14) |
|---|---|
| camel.springboot.routeControllerSuperviseEnabled | camel.routecontroller.enabled |
| camel.main.includeNonSingletons | camel.main.include-non-singletons |
| camel.main.mainRunController | camel.main.run-controller |
| camel.main.main-run-controller | camel.main.run-controller |
| camel.main.warnOnEarlyShutdown | camel.main.warn-on-early-shutdown |
| camel.server.devConsoleEnabled | camel.management.devConsoleEnabled |
| camel.server.healthCheckEnabled | camel.management.healthCheckEnabled |
| camel.server.jolokiaEnabled | camel.management.jolokiaEnabled |
| camel.server.metricsEnabled | camel.management.metricsEnabled |
| camel.server.uploadEnabled | camel.management.uploadEnabled |
| camel.server.uploadSourceDir | camel.management.uploadSourceDir |
| camel.server.downloadEnabled | camel.management.downloadEnabled |
| camel.server.sendEnabled | camel.management.sendEnabled |
| camel.server.healthPath | camel.management.healthPath |
| camel.server.jolokiaPath | camel.management.jolokiaPath |
In addition to the specific properties listed above, most properties previously using the camel.springboot.* prefix have been migrated to use the camel.main.* prefix.
Property names using camelCase format (e.g., mainRunController, includeNonSingletons) are converted to dash-case format (e.g., run-controller, include-non-singletons).
Additionally, all HTTP management-related properties using the camel.server.* prefix have been migrated to use the camel.management.* prefix. Review your application.properties or application.yml and update property names accordingly.
3.3.1. Automating Property Migration with camel-spring-boot-upgrade-recipes Copy linkLink copied to clipboard!
To automatically migrate your configuration properties, you can use the Apache Camel Upgrade Recipes tool. This tool will automatically update your application.properties or application.yml files with the correct property names.
To run the upgrade recipes, execute the following Maven command in your project directory:
mvn -U org.openrewrite.maven:rewrite-maven-plugin:run \
-Drewrite.recipeArtifactCoordinates=org.apache.camel.upgrade:camel-spring-boot-upgrade-recipes:4.14.1.redhat-00011 \
-Drewrite.activeRecipes=org.apache.camel.upgrade.CamelSpringBootMigrationRecipe
This command will:
- Automatically detect and update property names from the old to new format.
- Update your configuration files in place.
- Apply all relevant migration rules for Camel Spring Boot 4.14.