Camel 2.x/3.x Upgrade
Modernize Apache Camel 2.x/3.x projects to Camel 4.x YAML DSL
Overview
Camel-Kit helps you modernize legacy Apache Camel 2.x/3.x projects to Camel 4.x with YAML DSL, including projects based on Red Hat Fuse 6.x/7.x. The AI assistant analyzes your existing routes, configuration, and deployment artifacts, then generates updated code following Camel 4.x best practices.
Key transformations handled by Camel-Kit:
- XML DSL to YAML DSL — Spring XML and Blueprint XML routes converted to modern YAML syntax
- Deprecated components — Catalog-verified renames, with explicit decisions when no fixed replacement exists
- OSGi Blueprint removal — Property placeholders move to
application.properties; routes, beans, references, and service exports move to their Camel 4 runtime equivalents - Karaf features to runtime dependencies — OSGi feature bundles become Maven dependencies in
pom.xmlfor Spring Boot or Quarkus; Camel Main records them in the module-rootapplication.properties - Platform modernization — Migration paths from Karaf/OSGi to Camel Main, Spring Boot, or Quarkus
What Gets Parsed
Camel-Kit analyzes the following artifacts from your Camel 2.x/3.x project:
| Artifact | Description |
|---|---|
| Camel Context XML (Spring/Blueprint) | Route definitions, endpoint configurations, error handlers |
| Java DSL routes (RouteBuilder) | Programmatic route definitions |
| Properties files | Configuration properties, endpoint URIs, credentials |
| Blueprint XML | OSGi service wiring, bean definitions |
| Karaf features | Dependency bundles, OSGi feature declarations |
| fabric8 descriptors | Container metadata, deployment configuration |
The AI assistant parses all these artifacts together to understand the complete application structure before generating the modernized output.
Deprecated Component Updates
Several Camel components were renamed, consolidated, or removed before Camel 4.x. Camel-Kit uses the mappings below as starting points, then verifies each target and its options against the MCP catalog for the selected Camel version and runtime:
| Old Component (2.x/3.x) | New Component (4.x) |
|---|---|
camel-http4 | camel-http |
jetty9: consumer (camel-jetty9) | platform-http: (camel-platform-http) |
camel-netty4 | camel-netty |
camel-netty4-http | camel-netty-http |
camel-activemq | No forced rename; keep or replace only after catalog verification and a broker/runtime decision |
camel-mina2 | camel-mina |
camel-quartz2 | camel-quartz |
camel-rxjava2 | camel-rxjava, subject to MCP verification |
camel-mongodb3 | camel-mongodb |
camel-hdfs2 | camel-hdfs |
The AI will also flag components that have been fully removed and suggest modern alternatives.
Platform Migration Paths
Karaf/Blueprint → Camel Main, Spring Boot, or Quarkus
For projects running on Apache Karaf or Red Hat Fuse Karaf distributions:
- Blueprint route definitions are converted to
.camel.yamlroute files - Blueprint property placeholders move to
application.properties - Blueprint
<bean>and<reference>definitions become named registry or dependency-injection entries for the target runtime; infrastructure beans follow the Forage-first configuration ladder - OSGi
<service>exports are removed when no longer needed outside OSGi; required service contracts are recorded for implementation with the target runtime’s facilities - Karaf features (feature XML files) become standard Maven
<dependency>declarations inpom.xmlfor Spring Boot or Quarkus; Camel Main records the resolved coordinates undercamel.jbang.dependenciesin the module-rootapplication.properties
The AI will ask which target runtime you prefer and generate the appropriate configuration. Camel Main is offered only when all required Java processors, beans, and Blueprint configuration can be translated to supported YAML DSL or inline Groovy. If Java source must remain, choose Spring Boot or Quarkus so it can be compiled and packaged through Maven.
Spring XML → YAML DSL
For projects using Spring XML-based Camel configuration:
<camelContext>and<route>elements are converted to.camel.yamlroute files<bean>definitions are migrated using the target runtime’s bean support; infrastructure beans follow the Forage-first configuration ladder<endpoint>declarations are converted to inline URIs within routes
Bean references are preserved using the same IDs in the target runtime’s registry or dependency injection mechanism.
Java DSL → YAML DSL
Camel-Kit analyzes Java DSL RouteBuilder classes and expresses their routes in the Camel 4.x YAML design. Required Java API updates, such as replacing removed exchange APIs in custom processors, are recorded as implementation actions for /camel-execute; the migration does not promise a mixed Java/YAML output choice. Camel Main remains available only if no Java source must remain after translation; otherwise the design requires Spring Boot or Quarkus.
Common Scenarios
Red Hat Fuse Detection
Camel-Kit automatically detects Red Hat Fuse-based projects by looking for redhat-* or fuse-* version qualifiers in Maven dependencies (e.g., camel-core-2.23.2.fuse-7_11_1-00015).
For Fuse 6.x or 7.x projects, initialize Camel-Kit in the existing project with the camel source-platform hint, then start the migration skill in your AI assistant:
camel-kit init --here --ai claude --source-platform camel
# Then run /camel-migrate in Claude Code
Camel-Kit detects Fuse-specific version qualifiers and the migration skill generates notes for Red Hat-specific features.
Next Steps
After generating the modernized Camel 4.x code:
- Review the generated YAML routes and configuration files
- Update affected Java source from
javax.*tojakarta.*; Camel 4 requires Jakarta EE 10 across target runtimes - Test routes locally using
camel run(JBang) or your target platform’s dev mode - Consult the Apache Camel 4.x Migration Guide for additional breaking changes
Camel-Kit handles the most common migration patterns automatically, but complex integrations may require manual adjustments.