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 — Automatic replacement with Camel 4.x equivalents
- OSGi Blueprint to configuration files — Blueprint service definitions migrated to
application.propertiesorapplication.yaml - Karaf features to Maven dependencies — OSGi feature bundles converted to standard Maven dependencies
- Platform modernization — Migration paths from Karaf/OSGi to 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 in Camel 4.x. Camel-Kit automatically updates component references to their modern equivalents:
| Old Component (2.x/3.x) | New Component (4.x) |
|---|---|
camel-http4 | camel-http |
camel-jetty9 | camel-jetty |
camel-netty4 | camel-netty |
camel-netty4-http | camel-netty-http |
camel-activemq | camel-jms (with ActiveMQ client) |
camel-mina2 | camel-mina |
camel-quartz2 | camel-quartz |
camel-rxjava2 | Removed (use Camel reactive streams) |
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 → Spring Boot or Quarkus
For projects running on Apache Karaf or Red Hat Fuse Karaf distributions:
- OSGi Blueprint (
<blueprint>XML) is replaced withapplication.propertiesorapplication.yamlconfiguration files - Karaf features (feature XML files) are converted to standard Maven
<dependency>declarations inpom.xml - OSGi service injection (
<reference>tags) is replaced with CDI beans (Quarkus) or Spring dependency injection (Spring Boot)
The AI will ask which target platform you prefer (Spring Boot or Quarkus) and generate the appropriate configuration.
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 to CDI beans (Quarkus) or Spring@Componentclasses (Spring Boot)<endpoint>declarations are converted to inline URIs within routes
Bean references are preserved using the same bean IDs in the target platform’s dependency injection framework.
Java DSL → YAML DSL (Optional)
Camel-Kit can optionally convert Java DSL RouteBuilder classes to YAML route files. However, Java DSL is still fully supported in Camel 4.x, so this conversion is not always necessary or desired.
The AI assistant will ask whether you want to:
- Keep Java DSL routes (recommended for complex logic, dynamic routing, or heavy use of processors)
- Convert to YAML DSL (recommended for simple declarative routes)
You can mix both approaches in the same project.
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, you can explicitly specify the source platform:
camel-kit migrate --source-platform fuse
This ensures the AI uses Fuse-specific component mappings and generates migration 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 any custom processors or beans to use Jakarta EE APIs (if migrating to Quarkus)
- 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.