Migrating Fuse 7 Applications to Red Hat build of Apache Camel for Quarkus


Red Hat build of Apache Camel 4.8

Migrating Fuse 7 Applications to Red Hat build of Apache Camel for Quarkus

Abstract

Migrating Fuse 7 Applications to Red Hat build of Apache Camel for Quarkus provides information on migrating from Red Hat Fuse 7 to Red Hat build of Apache Camel for Quarkus.

Preface

Providing feedback on Red Hat build of Apache Camel documentation

To report an error or to improve our documentation, log in to your Red Hat Jira account and submit an issue. If you do not have a Red Hat Jira account, then you will be prompted to create an account.

Procedure

  1. Click the following link to create ticket
  2. Enter a brief description of the issue in the Summary.
  3. Provide a detailed description of the issue or enhancement in the Description. Include a URL to where the issue occurs in the documentation.
  4. Clicking Submit creates and routes the issue to the appropriate documentation team.

1.1.1. Fuse

Red Hat Fuse is an agile integration solution based on open source communities like Apache Camel and Apache Karaf. Red Hat Fuse is a lightweight, flexible integration platform that enables rapid on-premise cloud integration.

You can run Red Hat Fuse using three different runtimes:

  • Karaf which supports OSGi applications
  • Spring Boot
  • JBoss EAP (Enterprise Application Platform)

1.1.2. Red Hat build of Apache Camel for Quarkus

Red Hat build of Apache Camel for Quarkus brings the integration capabilities of Apache Camel and its vast component library to the Quarkus runtime. Red Hat build of Camel Quarkus provides Quarkus extensions for many of the Camel components.

Camel Quarkus takes advantage of the many performance improvements made in Camel 3, which results in a lower memory footprint, less reliance on reflection, and faster startup times.

In a Red Hat build of Apache Camel for Quarkus application, you define Camel routes using Java DSL, so you can migrate the Camel routes that you use in your Fuse application to CEQ.

1.1.3. Camel on EAP

Karaf, which follows the OSGI dependency management concept, and EAP, which follows the JEE specification, are application servers impacted by the adoption of containerized applications.

Containers have emerged as the predominant method for packaging applications. Consequently, the responsibility for managing applications, which encompasses deployment, scaling, clustering, and load balancing, has shifted from the application server to the container orchestration using Kubernetes.

Although EAP continues to be supported on Red Hat Openshift, Camel 3 is no longer supported on an EAP server. So if you have a Fuse 7 application running on an EAP server, you should consider migrating your application to the Red Hat Build of Apache Camel for Spring Boot or the Red Hat build of Apache Camel for Quarkus and take the benefit of the migration process to consider a redesign, or partial redesign of your application, from a monolith to a microservices architecture.

If you do not use Openshift, RHEL virtual machines remain a valid approach when you deploy your application for Spring Boot and Quarkus, and Quarkus also benefits from its native compilation capabilities. It is important to evaluate the tooling to support the management of a microservices architecture on such a platform.

Red Hat provides this capability through Ansible, using the Red Hat Ansible for Middleware collections.

1.2. Standard migration paths

1.2.1. XML path

Fuse applications written in Spring XML or Blueprint XML should be migrated towards an XML-based flavor, and can target either the Spring Boot or the Quarkus runtime with no difference in the migration steps.

1.2.2. Java path

Fuse applications written in Java DSL should be migrated towards a Java-based flavor, and can target either the Spring Boot or the Quarkus runtime with no difference in the migration steps.

1.3. Architectural changes

Openshift has replaced Fabric8 as the runtime platform for Fuse 6 users and is the recommended target for your Fuse application migration.

You should consider the following architectural changes when you are migrating your application:

  • If your Fuse 6 application relied on the Fabric8 service discovery, you should use Kubernetes Service Discovery when running Camel 3 on OpenShift.
  • If your Fuse 6 application relies on OSGi bundle configuration, you should use Kubernetes ConfigMaps and Secrets when running Camel 3 on OpenShift.
  • If your application uses a file-based route definition, consider using AWS S3 technology when running Camel 3 on OpenShift.
  • If your application uses a standard filesystem, the resulting Spring Boot or Quarkus applications should be deployed on standard RHEL virtual machines rather than the Openshift platform.
  • Delegation of Inbound HTTPS connections to the Openshift Router which handles SSL requirements.
  • Delegation of Hystrix features to Service Mesh.

1.4. The javax to jakarta package namespace change

The Java EE move to the Eclipse Foundation and the establishment of Jakarta EE, since Jakarta EE 9, packages used for all EE APIs have changed to jakarta.*

Code snippets in documentation have been updated to use the jakarta.* namespace, but you of course need to take care and review your own applications.

Note

This change does not affect javax packages that are part of Java SE.

When migrating applications to EE 10, you need to:

  • Update any import statements or other source code uses of EE API classes from the javax package to jakarta.
  • Change any EE-specified system properties or other configuration properties whose names begin with javax. to begin with jakarta..
  • Use the META-INF/services/jakarta.[rest_of_name] name format to identify implementation classes in your applications that use the implement EE interfaces or abstract classes bootstrapped with the java.util.ServiceLoader mechanism.

1.4.1. Migration tools

Note

You can define Camel routes in Red Hat build of Apache Camel for Quarkus applications using Java DSL, XML IO DSL, or YAML.

2.1. Java DSL route migration example

To migrate a Java DSL route definition from your Fuse application to CEQ, you can copy your existing route definition directly to your Red Hat build of Apache Camel for Quarkus application and add the necessary dependencies to your Red Hat build of Apache Camel for Quarkus pom.xml file.

In this example, we will migrate a content-based route definition from a Fuse 7 application to a new CEQ application by copying the Java DSL route to a file named Routes.java in your CEQ application.

Procedure

  1. Using the code.quarkus.redhat.com website, select the extensions required for this example:

    • camel-quarkus-file
    • camel-quarkus-xpath
  2. Navigate to the directory where you extracted the generated project files from the previous step:

    $ cd <directory_name>
    Copy to Clipboard Toggle word wrap
  3. Create a file named Routes.java in the src/main/java/org/acme/ subfolder.
  4. Add the route definition from your Fuse application to the Routes.java, similar to the following example:

    package org.acme;
    
    import org.apache.camel.builder.RouteBuilder;
    
    public class Routes extends RouteBuilder {
    	// Add your Java DSL route definition here
        public void configure() {
    	    from("file:work/cbr/input")
                .log("Receiving order ${file:name}")
                .choice()
                    .when().xpath("//order/customer/country[text() = 'UK']")
                        .log("Sending order ${file:name} to the UK")
                        .to("file:work/cbr/output/uk")
                    .when().xpath("//order/customer/country[text() = 'US']")
                        .log("Sending order ${file:name} to the US")
                        .to("file:work/cbr/output/uk")
                    .otherwise()
                        .log("Sending order ${file:name} to another country")
                        .to("file:work/cbr/output/others");
        }
    
    }
    Copy to Clipboard Toggle word wrap
  5. Compile your CEQ application.

    mvn clean compile quarkus:dev
    Copy to Clipboard Toggle word wrap
Note

This command compiles the project, starts your application, and lets the Quarkus tooling watch for changes in your workspace. Any modifications in your project will automatically take effect in the running application.

2.2. Blueprint XML DSL route migration

To migrate a Blueprint XML route definition from your Fuse application to CEQ, use the camel-quarkus-xml-io-dsl extension and copy your Fuse application route definition directly to your CEQ application. You will then need to add the necessary dependencies to the CEQ pom.xml file and update your CEQ configuration in the application.properties file.

Note

CEQ supports Camel 3, whereas Fuse 7 supports Camel 2.

For more information relating to upgrading Camel when you migrate your Red Hat Fuse 7 application to CEQ, see Migrating Apache Camel.

For more information about using beans in Camel Quarkus, see the CDI and the Camel Bean Component section in the Developing Applications with Red Hat build of Apache Camel for Quarkus guide.

2.2.1. XML-IO-DSL limitations

You can use the camel-quarkus-xml-io-dsl extension to assist with migrating a Blueprint XML route definition to CEQ.

The camel-quarkus-xml-io-dsl extension only supports the following <camelContext> sub-elements:

  • routeTemplates
  • templatedRoutes
  • rests
  • routes
  • routeConfigurations
Note

As Blueprint XML supports other bean definitions that are not supported by the camel-quarkus-xml-io-dsl extension, you may need to rewrite other bean definitions that are included in your Blueprint XML route definition.

You must define every element (XML IO DSL) in a separate file. For example, this is a simplified example of a Blueprint XML route definition:

<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
    <camelContext xmlns="http://camel.apache.org/schema/blueprint">
        <restConfiguration contextPath="/camel" />
        <rest path="/books">
            <get uri="/">
                <to ..../>
            </get>
        </rest>
        <route>
            <from ..../>
        </route>
    </camelContext>
</blueprint>
Copy to Clipboard Toggle word wrap

You can migrate this Blueprint XML route definition to CEQ using XML IO DSL as defined in the following files:

src/main/resources/routes/camel-rests.xml

<rests xmlns="http://camel.apache.org/schema/spring">
    <rest path="/books">
    <get path="/">
        <to ..../>
    </get>
    </rest>
</rests>
Copy to Clipboard Toggle word wrap

src/main/resources/routes/camel-routes.xml

<routes xmlns="http://camel.apache.org/schema/spring">
    <route>
        <from ..../>
    </route>
</routes>
Copy to Clipboard Toggle word wrap

You must use Java DSL to define other elements which are not supported, such as <restConfiguration>. For example, using a route builder defined in a camel-rests.xml file as follows:

src/main/resources/routes/camel-rests.xml

import org.apache.camel.builder.RouteBuilder;
public class Routes extends RouteBuilder {
    public void configure() {
       restConfiguration()
            .contextPath("/camel");
    }
}
Copy to Clipboard Toggle word wrap

2.2.2. Blueprint XML DSL route migration example

Note

For more information about using the XML IO DSL extension, see the XML IO DSL documentation in the Red Hat build of Apache Camel for Quarkus Extensions.

In this example, you are migrating a content-based route definition from a Fuse application to a new CEQ application by copying the Blueprint XML route definition to a file named camel-routes.xml in your CEQ application.

Procedure

  1. Using the code.quarkus.redhat.com website, select the following extensions for this example:

    • camel-quarkus-xml-io-dsl
    • camel-quarkus-file
    • camel-quarkus-xpath
  2. Select Generate your application to confirm your choices and display the overlay screen with the download link for the archive that contains your generated project.
  3. Select Download the ZIP to save the archive with the generated project files to your machine.
  4. Extract the contents of the archive.
  5. Navigate to the directory where you extracted the generated project files from the previous step:

    $ cd <directory_name>
    Copy to Clipboard Toggle word wrap
  6. Create a file named camel-routes.xml in the src/main/resources/routes/ directory.
  7. Copy the <route> element and sub-elements from the following blueprint-example.xml example to the camel-routes.xml file:

    blueprint-example.xml

    <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
        <camelContext id="cbr-example-context" xmlns="http://camel.apache.org/schema/blueprint">
            <route id="cbr-route">
                <from id="_from1" uri="file:work/cbr/input"/>
                <log id="_log1" message="Receiving order ${file:name}"/>
                <choice id="_choice1">
                    <when id="_when1">
                        <xpath id="_xpath1">/order/customer/country = 'UK'</xpath>
                        <log id="_log2" message="Sending order ${file:name} to the UK"/>
                        <to id="_to1" uri="file:work/cbr/output/uk"/>
                    </when>
                    <when id="_when2">
                        <xpath id="_xpath2">/order/customer/country = 'US'</xpath>
                        <log id="_log3" message="Sending order ${file:name} to the US"/>
                        <to id="_to2" uri="file:work/cbr/output/us"/>
                    </when>
                    <otherwise id="_otherwise1">
                        <log id="_log4" message="Sending order ${file:name} to another country"/>
                        <to id="_to3" uri="file:work/cbr/output/others"/>
                    </otherwise>
                </choice>
                <log id="_log5" message="Done processing ${file:name}"/>
            </route>
        </camelContext>
    </blueprint>
    Copy to Clipboard Toggle word wrap

    camel-routes.xml

    <route id="cbr-route">
        <from id="_from1" uri="file:work/cbr/input"/>
        <log id="_log1" message="Receiving order ${file:name}"/>
        <choice id="_choice1">
            <when id="_when1">
                <xpath id="_xpath1">/order/customer/country = 'UK'</xpath>
                <log id="_log2" message="Sending order ${file:name} to the UK"/>
                <to id="_to1" uri="file:work/cbr/output/uk"/>
            </when>
            <when id="_when2">
                <xpath id="_xpath2">/order/customer/country = 'US'</xpath>
                <log id="_log3" message="Sending order ${file:name} to the US"/>
                <to id="_to2" uri="file:work/cbr/output/us"/>
            </when>
            <otherwise id="_otherwise1">
                <log id="_log4" message="Sending order ${file:name} to another country"/>
                <to id="_to3" uri="file:work/cbr/output/others"/>
            </otherwise>
        </choice>
        <log id="_log5" message="Done processing ${file:name}"/>
    </route>
    Copy to Clipboard Toggle word wrap

  8. Modify application.properties

    # Camel
    #
    camel.context.name = camel-quarkus-xml-io-dsl-example
    camel.main.routes-include-pattern = file:src/main/resources/routes/camel-routes.xml
    Copy to Clipboard Toggle word wrap
  9. Compile your CEQ application.

    mvn clean compile quarkus:dev
    Copy to Clipboard Toggle word wrap
    Note

    This command compiles the project, starts your application, and lets the Quarkus tooling watch for changes in your workspace. Any modifications in your project will automatically take effect in the running application.

Legal Notice

Copyright © 2025 Red Hat, Inc.
The text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, the Red Hat logo, JBoss, OpenShift, Fedora, the Infinity logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.
Linux® is the registered trademark of Linus Torvalds in the United States and other countries.
Java® is a registered trademark of Oracle and/or its affiliates.
XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries.
MySQL® is a registered trademark of MySQL AB in the United States, the European Union and other countries.
Node.js® is an official trademark of Joyent. Red Hat is not formally related to or endorsed by the official Joyent Node.js open source or commercial project.
The OpenStack® Word Mark and OpenStack logo are either registered trademarks/service marks or trademarks/service marks of the OpenStack Foundation, in the United States and other countries and are used with the OpenStack Foundation's permission. We are not affiliated with, endorsed or sponsored by the OpenStack Foundation, or the OpenStack community.
All other trademarks are the property of their respective owners.
Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust. Explore our recent updates.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Theme

© 2026 Red Hat
Back to top