이 콘텐츠는 선택한 언어로 제공되지 않습니다.

Chapter 2. Overview of migrating Red Hat Fuse 7 applications to Red Hat build of Apache Camel for Spring Boot


2.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)

2.2. Red Hat build of Apache Camel for Spring Boot

Red Hat build of Apache Camel for Spring Boot provides auto-configuration of the starters for many Camel components. The opinionated auto-configuration of the Camel context auto-detects Camel routes available in the Spring context and registers the key Camel utilities (like producer template, consumer template and the type converter) as beans. Camel Spring Boot takes advantage of the many performance improvements made in Apache Camel, which results in a lower memory footprint, less reliance on reflection, and faster startup times.

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

2.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. The benefit of the migration process is 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.

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

2.4. Standard Migration Paths

Following section describes the standard migration paths that you can consider before migrating your applications to Red Hat build of Apache Camel for Spring Boot.

2.4.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.

2.4.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.

2.4.3. Architectural changes

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.

2.4.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.

2.4.5. Migration tools

2.5. Migrating the application to Camel Spring Boot

Apache Camel is a versatile integration framework that enables seamless communication and data exchange between different applications. Key components of Apache Camel on Spring Boot include endpoints, processors, and routes. Configuration options in Spring Boot allow you to fine-tune the behavior of Apache Camel, making it a flexible and customizable integration solution.

2.5.1. Migrating the pom.xml file

Update the existing project’s pom.xml file. In the original Spring Boot application, the pom.xml contained dependencies related to Spring Boot and Apache Camel. Update the dependencies so that the application will run using the latest Camel Spring Boot.

2.6. Java DSL route migration example

To migrate a Java DSL route definition from your Fuse application to CSB, you can copy your existing route definition directly to your CSB application and add the necessary dependencies to your application’s pom.xml file.

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

Procedure

  1. Download the Spring Boot example. This example shows how to work with a simple Apache Camel application using Spring Boot.
  2. Navigate to the directory where you extracted the example files from the previous step:

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

    package sample.camel;
    
    import org.apache.camel.builder.RouteBuilder;
    import org.springframework.beans.factory.annotation.Autowired;
    import org.springframework.stereotype.Component;
    
    /**
     * A simple Camel route that triggers from a timer and calls a bean and prints to system out.
     * <p/>
     * Use <tt>@Component</tt> to make Camel auto-detect this route when starting.
     */
    @Component
    public class MyCamelRouter extends RouteBuilder {
    
        // we can use spring dependency injection
        @Autowired
        MyBean myBean;
    
        @Override
        public void configure() throws Exception {
            // start from a timer
            from("timer:hello?period={{myPeriod}}").routeId("hello")
                    // and call the bean
                    .bean(myBean, "saySomething")
                    // and print it to system out via stream component
                    .to("stream:out");
        }
    
    }
    Copy to Clipboard Toggle word wrap
  5. Run your CSB application.

    mvn spring-boot:run
    Copy to Clipboard Toggle word wrap
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2026 Red Hat
맨 위로 이동