Fuse 7 Applications를 Red Hat build of Apache Camel for Quarkus로 마이그레이션


Red Hat build of Apache Camel 4.4

Fuse 7 Applications를 Red Hat build of Apache Camel for Quarkus로 마이그레이션

Red Hat build of Apache Camel Documentation Team Red Hat build of Apache Camel Support Team http://access.redhat.com/support

초록

Fuse 7 애플리케이션을 Red Hat build of Apache Camel for Quarkus로 마이그레이션하면 Red Hat Fuse 7에서 Red Hat build of Apache Camel for Quarkus로의 마이그레이션에 대한 정보를 제공합니다.

머리말

Red Hat build of Apache Camel 설명서

오류를 보고하거나 문서를 개선하기 위해 Red Hat Jira 계정에 로그인하여 문제를 제출하십시오. Red Hat Jira 계정이 없는 경우 계정을 생성하라는 메시지가 표시됩니다.

프로세스

  1. 티켓을 생성하려면다음 링크를 클릭하십시오.
  2. 요약에 문제에 대한 간략한 설명을 입력합니다.
  3. 설명에서 문제 또는 개선 사항에 대한 자세한 설명을 제공합니다. 문서에서 문제가 발생한 위치에 URL을 포함합니다.
  4. Submit 을 클릭하고 문제를 적절한 문서 팀으로 라우팅합니다.

Fuse

Red Hat Fuse는 Apache Camel 및 Apache Karaf와 같은 오픈 소스 커뮤니티를 기반으로 하는 민첩한 통합 솔루션입니다. Red Hat Fuse는 온프레미스 클라우드 통합을 빠르게 수행할 수 있는 경량의 유연한 통합 플랫폼입니다.

세 가지 다른 런타임을 사용하여 Red Hat Fuse를 실행할 수 있습니다.

  • OSGi 애플리케이션을 지원하는 Karaf
  • Spring Boot
  • JBoss EAP(Enterprise Application Platform)

Red Hat build of Apache Camel for Quarkus

Red Hat build of Apache Camel for Quarkus는 Apache Camel의 통합 기능과 광범위한 구성 요소 라이브러리를 Quarkus 런타임에 제공합니다. Red Hat build of Camel Quarkus는 여러 Camel 구성 요소에 대한 Quarkus 확장을 제공합니다.

Camel Quarkus는 Camel 3에서 얻은 많은 성능 개선을 활용하여 메모리 공간을 낮추고 반영에 대한 의존도를 줄이고 시작 시간을 단축시킵니다.

Red Hat build of Apache Camel for Quarkus 애플리케이션에서는 Java DSL을 사용하여 Camel 경로를 정의하므로 Fuse 애플리케이션에서 사용하는 Camel 경로를 CEQ로 마이그레이션할 수 있습니다.

Camel on EAP

OSGI 종속성 관리 개념을 따르는 Karaf와 JEE 사양을 따르는 EAP는 컨테이너화된 애플리케이션의 채택의 영향을 받는 애플리케이션 서버입니다.

컨테이너는 애플리케이션 패키징을 위한 주요 방법으로 등장했습니다. 결과적으로 배포, 확장, 클러스터링 및 로드 밸런싱을 포함하는 애플리케이션 관리 책임은 Kubernetes를 사용하여 애플리케이션 서버에서 컨테이너 오케스트레이션으로 전환되었습니다.

Red Hat Openshift에서 EAP가 계속 지원되지만 Camel 3은 더 이상 EAP 서버에서 지원되지 않습니다. 따라서 EAP 서버에서 Fuse 7 애플리케이션을 실행하는 경우, 애플리케이션을 Red Hat Build of Apache Camel for Spring Boot로 마이그레이션하거나 Red Hat build of Apache Camel for Quarkus로 마이그레이션하고 마이그레이션 프로세스의 이점을 활용하여 애플리케이션의 매노리스에서 마이크로 서비스 아키텍처로 마이그레이션해야 합니다.

Openshift를 사용하지 않는 경우 Spring Boot 및 Quarkus용 애플리케이션을 배포할 때 RHEL 가상 머신은 유효한 접근 방식을 유지하고 Quarkus도 네이티브 컴파일 기능의 이점을 누릴 수 있습니다. 이러한 플랫폼에서 마이크로서비스 아키텍처 관리를 지원하기 위해 툴링을 평가하는 것이 중요합니다.

Red Hat은 미들웨어 컬렉션에 Red Hat Ansible을 사용하여 Ansible을 통해 이 기능을 제공합니다.

1.1. 표준 마이그레이션 경로

1.1.1. XML 경로

Spring XML 또는 블루프린트 XML로 작성된 Fuse 애플리케이션은 XML 기반 플레이버로 마이그레이션되어야 하며 마이그레이션 단계의 차이 없이 Spring Boot 또는 Quarkus 런타임을 대상으로 지정할 수 있습니다.

1.1.2. Java 경로

Java DSL로 작성된 Fuse 애플리케이션은 Java 기반 플레이버로 마이그레이션되어야 하며 마이그레이션 단계 없이 Spring Boot 또는 Quarkus 런타임을 대상으로 지정할 수 있습니다.

1.2. 아키텍처 변경

OpenShift는 Fabric8을 Fuse 6 사용자의 런타임 플랫폼으로 교체했으며 Fuse 애플리케이션 마이그레이션에 권장되는 대상입니다.

애플리케이션을 마이그레이션할 때 다음과 같은 아키텍처 변경 사항을 고려해야 합니다.

  • Fuse 6 애플리케이션이 Fabric8 서비스 검색에 의존하는 경우 OpenShift에서 Camel 3을 실행할 때 Kubernetes Service Discovery를 사용해야 합니다.
  • Fuse 6 애플리케이션이 OSGi 번들 구성을 사용하는 경우 OpenShift에서 Camel 3을 실행할 때 Kubernetes ConfigMaps 및 Secrets를 사용해야 합니다.
  • 애플리케이션에서 파일 기반 경로 정의를 사용하는 경우 OpenShift에서 Camel 3을 실행할 때 AWS S3 기술을 사용하는 것이 좋습니다.
  • 애플리케이션에서 표준 파일 시스템을 사용하는 경우 결과 Spring Boot 또는 Quarkus 애플리케이션을 Openshift 플랫폼이 아닌 표준 RHEL 가상 머신에 배포해야 합니다.
  • SSL 요구 사항을 처리하는 Openshift 라우터에 인바운드 HTTPS 연결 위임.
  • Service Mesh 에 Hystrix 기능 위임 .

2장. Camel 경로를 Fuse 7에서 Camel로 마이그레이션

참고

Java DSL, XML IO DSL 또는 YAML을 사용하여 Red Hat build of Apache Camel for Quarkus 애플리케이션에서 Camel 경로를 정의할 수 있습니다.

2.1. Java DSL 경로 마이그레이션 예

Java DSL 경로 정의를 Fuse 애플리케이션에서 CEQ로 마이그레이션하려면 기존 경로 정의를 Red Hat build of Apache Camel for Quarkus 애플리케이션에 직접 복사하고 필요한 종속성을 Quarkus pom.xml 파일의 Red Hat 빌드에 추가할 수 있습니다.

이 예제에서는 CEQ 애플리케이션의 Routes.java 파일에 Java DSL 경로를 복사하여 Fuse 7 애플리케이션에서 새 CEQ 애플리케이션으로 컨텐츠 기반 경로 정의를 마이그레이션합니다.

프로세스

  1. code.quarkus.redhat.com 웹 사이트를 사용하여 다음 예제에 필요한 확장을 선택합니다.

    • Camel-quarkus-file
    • camel-quarkus-xpath
  2. 이전 단계에서 생성된 프로젝트 파일을 추출한 디렉터리로 이동합니다.

    $ cd <directory_name>
    Copy to Clipboard Toggle word wrap
  3. src/main/java/org/acme/ subfolder에 Routes.java 라는 파일을 생성합니다.
  4. 다음 예와 유사하게 Fuse 애플리케이션의 경로 정의를 Routes.java 에 추가합니다.

    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. CEQ 애플리케이션을 컴파일합니다.

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

이 명령은 프로젝트를 컴파일하고, 애플리케이션을 시작하고, Quarkus 툴을 통해 작업 공간의 변경 사항을 조사할 수 있습니다. 프로젝트의 모든 수정 사항은 실행 중인 애플리케이션에 자동으로 적용됩니다.

2.2. XML DSL 경로 마이그레이션 블루프린트

블루프린트 XML 경로 정의를 Fuse 애플리케이션에서 CEQ로 마이그레이션하려면 camel-quarkus-xml-io-dsl 확장을 사용하여 Fuse 애플리케이션 경로 정의를 CEQ 애플리케이션에 직접 복사합니다. 그런 다음 필요한 종속 항목을 CEQ pom.xml 파일에 추가하고 application.properties 파일에서 CEQ 구성을 업데이트해야 합니다.

참고

CEQ는 Camel 3을 지원하지만 Fuse 7은 Camel 2를 지원합니다. Red Hat Fuse 7 애플리케이션을 CEQ로 마이그레이션할 때 Camel 업그레이드에 대한 자세한 내용은 Camel 2에서 Camel 3으로 마이그레이션 을 참조하십시오.

Camel Quarkus에서 빈을 사용하는 방법에 대한 자세한 내용은 Red Hat build of Apache Camel for Quarkus 가이드의 CDI 및 Camel Cryostat 구성 요소 섹션을 참조하십시오.

2.2.1. XML-IO-DSL 제한 사항

camel-quarkus-xml-io-dsl 확장을 사용하여 블루프린트 XML 경로 정의를 CEQ로 마이그레이션할 수 있습니다.

camel-quarkus-xml-io-dsl 확장은 다음 < camelContext > 하위 요소만 지원합니다.

  • routeTemplates
  • templatedRoutes
  • rests
  • routes
  • routeConfigurations
참고

블루프린트 XML은 camel-quarkus-xml-io-dsl 확장에서 지원하지 않는 다른 Quarkus 정의를 지원하므로 블루프린트 XML 경로 정의에 포함된 다른 Cryostat 정의를 다시 작성해야 할 수 있습니다.

각 요소( XML IO DSL)를 별도의 파일에 정의해야 합니다. 예를 들어 블루프린트 XML 경로 정의의 단순화된 예는 다음과 같습니다.

<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

다음 파일에 정의된 XML IO DSL을 사용하여 이 블루프린트 XML 경로 정의를 CEQ로 마이그레이션할 수 있습니다.

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

Java DSL을 사용하여 < restConfiguration>과 같이 지원되지 않는 다른 요소를 정의해야 합니다. 예를 들어 다음과 같이 camel-rests.xml 파일에 정의된 경로 빌더를 사용합니다.

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. 블루프린트 XML DSL 경로 마이그레이션 예

참고

{link

XML IO DSL 확장 사용에 대한 자세한 내용은 Red Hat build of Apache Camel for Quarkus Extensions에서 XML IO DSL 문서를 참조하십시오.

이 예에서는 블루프린트 XML 경로 정의를 CEQ 애플리케이션의 camel-routes.xml 파일에 복사하여 Fuse 애플리케이션에서 새 CEQ 애플리케이션으로 컨텐츠 기반 경로 정의를 마이그레이션하고 있습니다.

프로세스

  1. code.quarkus.redhat.com 웹 사이트를 사용하여 이 예제에 대해 다음 확장을 선택합니다.

    • camel-quarkus-xml-io-dsl
    • Camel-quarkus-file
    • camel-quarkus-xpath
  2. 애플리케이션 생성 을 선택하여 선택 사항을 확인하고 생성된 프로젝트가 포함된 아카이브의 다운로드 링크와 오버레이 화면을 표시합니다.
  3. ZIP 다운로드를 선택하여 생성된 프로젝트 파일이 포함된 아카이브를 머신에 저장합니다.
  4. 아카이브 내용을 추출합니다.
  5. 이전 단계에서 생성된 프로젝트 파일을 추출한 디렉터리로 이동합니다.

    $ cd <directory_name>
    Copy to Clipboard Toggle word wrap
  6. src/main/resources/routes/ 디렉터리에 camel-routes.xml 이라는 파일을 만듭니다.
  7. 다음 블루프린트-example.xml 예제의 < route > 요소 및 하위 요소를 camel-routes.xml 파일로 복사합니다.

    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. 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. CEQ 애플리케이션을 컴파일합니다.

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

    이 명령은 프로젝트를 컴파일하고, 애플리케이션을 시작하고, Quarkus 툴을 통해 작업 공간의 변경 사항을 조사할 수 있습니다. 프로젝트의 모든 수정 사항은 실행 중인 애플리케이션에 자동으로 적용됩니다.

3장. Apache Camel 마이그레이션

3.1. Camel 마이그레이션 가이드 정보

이 가이드에서는 애플리케이션을 마이그레이션할 때 고려해야 하는 Apache Camel 구성 요소의 변경 사항에 대해 자세히 설명합니다. 이 가이드에서는 다음 변경 사항에 대한 정보를 제공합니다.

  • 지원되는 Java 버전
  • Apache Camel 구성 요소 및 더 이상 사용되지 않는 구성 요소 관련 변경 사항
  • API 및 더 이상 사용되지 않는 API 변경
  • EIP 업데이트
  • 추적 및 상태 점검으로 업데이트됨

3.2. Apache Camel 4로 마이그레이션

이 섹션에서는 Apache Camel 애플리케이션을 버전 3.20 이상에서 4.0으로 마이그레이션하는 데 도움이 되는 정보를 제공합니다.

참고

개별 버전에 대한 자세한 내용은 다음을 참조하십시오.

Apache Camel Quarkus를 업그레이드하는 방법에 대한 자세한 내용은 다음을 참조하십시오.

3.2.1. Java 버전

Apache Camel 4는 Java 17을 지원합니다. Java 11에 대한 지원이 중단되었습니다.

3.2.2. 제거된 구성 요소

다음 구성 요소가 제거되었습니다.

Expand
Component대체 구성 요소

camel-any23

none

camel-atlasmap

none

Camel-atmos

none

camel-caffeine-lrucache

Camel-cache, camel-ignite, camel-infinispan

camel-cdi

Camel-spring-boot, camel-quarkus

camel-corda

none

camel-directvm

Camel-direct

Camel-d Cryostater

camel-mapstruct

camel-elasticsearch-rest

camel-elasticsearch

Camel-gora

none

Camel-hbase

none

Camel-hyperledger-aries

none

Camel-iota

none

camel-ipfs

none

camel-jbpm

none

Camel-jclouds

none

camel-johnzon

camel-jackson, camel-fastjson, camel-gson

Camel-microprofile-metrics

Camel-micrometer, camel-opentelemetry

Camel-milo

none

Camel-opentracing

Camel-micrometer, camel-opentelemetry

camel-rabbitmq

spring-rabbitmq-component

camel-rest-swagger

camel-openapi-rest

camel-restdsl-swagger-plugin

camel-restdsl-openapi-plugin

Camel-resteasy

Camel-cxf, camel-rest

Camel-solr

none

camel-spark

none

Camel-spring-integration

none

camel-swagger-java

camel-openapi-java

camel-websocket

camel-vertx-websocket

camel-websocket-jsr356

camel-vertx-websocket

camel-vertx-kafka

camel-kafka

camel-vm

Camel-seda

Camel-weka

none

camel-xstream

camel-jacksonxml

Camel-zipkin

Camel-micrometer, camel-opentelemetry

3.2.3. 로깅

Camel 4에서 로깅 facade API slf4j-api 를 1.7에서 2.0으로 업그레이드했습니다.

3.2.4. JUnit 4

JUnit 4.x 기반이었던 모든 camel-test 모듈이 제거되었습니다. 이제 모든 테스트 모듈에서 JUnit 5를 사용합니다.

3.2.5. API 변경 사항

다음 API는 더 이상 사용되지 않으며 버전 4에서 제거됩니다.

  • org.apache.camel.ExchangePatternInOptionalOut 을 제거했습니다.
  • CamelContext 에서 getEndpointMap() 메서드를 제거합니다.
  • 대신 @Converter(fallback = true) 를 사용해야 하므로 제거된 @FallbackConverter.
  • 대신 value (기본값)를 사용해야 하므로 @EndpointInject,@Produce, @Consume 에서 제거된 uri 속성입니다. 예를 들어 @Produce(uri = "kafka:cheese")@Produce("kafka:cheese")로 변경해야 합니다.
  • 대신 카테고리 를 사용해야 하므로 @UriEndpoint 에서 삭제된 레이블 입니다.
  • ProducerTemplate 에서 모든 asyncCallback 메서드를 제거했습니다. 대신 asyncSend 또는 asyncRequest 를 사용합니다.
  • org.apache.camel.spi.OnCamelContextStart 를 제거했습니다. 대신 org.apache.camel.spi.OnCamelContextStarting 을 사용합니다.
  • org.apache.camel.spi.OnCamelContextStop 을 삭제했습니다. 대신 org.apache.camel.spi.OnCamelContextStopping 을 사용합니다.
  • org.apache.camel.ExtendedCamelContextorg.apache.camel.CamelContext 에서 분리했습니다.
  • org.apache.camel.CamelContextadapt()getCamelContextExtension로 교체
  • org.apache.camel.ExtendedExchangeorg.apache.camel.Exchange 에서 분리했습니다.
  • org.apache.camel.ExtendedExchangeadapt()getExchangeExtension로 교체
  • 교환 실패 처리 상태가 ExchangePropertyKey.FAILURE_HANDLED 로 정의된 속성에서 'isFailureHandled()'method를 통해 액세스할 수 있는 ExtendedExchange의 멤버로 이동했습니다.
  • org.apache.camel.util.concurrent.ThreadPoolRejectedPolicy 에서 제거된 DiscardDiscardOldest.
  • org.apache.camel.builder.SimpleBuilder 를 제거했습니다. 대부분의 경우 Camel에서 Java DSL과 함께 내부적으로 사용되었습니다.
  • org.apache.camel.support.IntrospectionSupport 를 내부 용도로만 camel-core-engine 으로 이동했습니다. 최종 사용자는 대신 org.apache.camel.spi.BeanInspection 을 사용해야 합니다.
  • org.apache.camel.catalog.CamelCatalog 에서 제거된 archetype CatalogA Cryostat 메서드.
  • org.apache.camel.health.HealthCheck 메서드는 이제 true 대신 기본 false 입니다.
  • org.apache.camel.StreamCache위치 메서드를 추가했습니다.
  • org.apache.camel.main.Listener 인터페이스에서 구성된 방법이 제거되었습니다.
  • org.apache.camel.support.EventNotifierSupport 추상 클래스는 이제 CamelContextAware 를 구현합니다.
  • CamelContextdumpRoutes 유형이 부울 에서 String 으로 변경되어 xml 또는 yaml을 지정할 수 있습니다.
참고

org.apache.camel.support.PluginHelper 는 Camel v3에서 이전에 Camel v3에서 직접 사용할 수 있는 다양한 확장 및 컨텍스트 플러그인에 쉽게 액세스할 수 있습니다.

3.2.6. EIP 변경 사항

  • 모든 EIP에서 < description> 에 대해 lang 특성을 제거합니다.
  • InOnlyInOut EIPs가 제거되었습니다. 대신 SetExchangePattern 또는 To 를 사용하여 사용할 교환 패턴을 지정할 수 있습니다.
3.2.6.1. poll Enrich EIP

폴링된 엔드포인트 URI는 이제 다른 모든 EIP와 마찬가지로 Exchange (키 CamelToEndpoint)에 속성으로 저장됩니다. URI가 메시지 헤더로 저장되기 전에

3.2.6.2. CircuitBreaker EIP

camel-resilience4j 의 다음 옵션은 실수로 속성으로 정의되지 않았습니다.

Expand

옵션

bulkheadEnabled

bulkheadMaxConcurrentCalls

bulkheadMaxWaitDuration

timeoutEnabled

timeoutExecutorService

timeoutDuration

timeoutCancelRunningFuture

이러한 옵션은 YAML DSL에 노출되지 않았으며 XML DSL에서 마이그레이션해야 합니다.

<circuitBreaker>
    <resilience4jConfiguration>
        <timeoutEnabled>true</timeoutEnabled>
        <timeoutDuration>2000</timeoutDuration>
    </resilience4jConfiguration>
...
</circuitBreaker>
Copy to Clipboard Toggle word wrap

대신 다음 속성을 사용하려면 다음을 수행합니다.

<circuitBreaker>
    <resilience4jConfiguration timeoutEnabled="true" timeoutDuration="2000"/>
...
</circuitBreaker>
Copy to Clipboard Toggle word wrap

3.2.7. XML DSL

경로 또는 노드에 대한 설명을 설정하는 <description>이 요소에서 특성으로 변경되었습니다.

<route id="myRoute" description="Something that this route do">
  <from uri="kafka:cheese"/>
  ...
</route>
Copy to Clipboard Toggle word wrap

3.2.8. 유형:

문자열java.io.File 변환기가 제거되었습니다.

3.2.9. 추적

TracerBacklog Tracer 에는 Rest DSL 또는 경로 템플릿 또는 Kamelets에서 생성한 경로의 내부 추적 이벤트가 더 이상 포함되지 않습니다. 추적기에서 traceTemplates=true 를 설정하여 이를 켤 수 있습니다.

Backlog Tracer 가 메시지 헤더(또한 스트리밍 유형)를 추적하도록 개선되고 수정되었습니다. 즉, 이전에 InputStream 유형의 헤더는 이전에 추적되지 않았지만 이제 포함됩니다. 이는 헤더 스트림이 끝에 배치되고 나중에 헤더를 로깅하면 헤더 값이 비어 있으므로 표시될 수 있습니다.

3.2.10. UseOriginalMessage / UseOriginalBody

When useOriginalMessage or useOriginalBody is enabled in OnException,OnCompletion or error handlers, then the original message body is defensively copied and if possible converted to StreamCache to ensure the body can be re-read when accessed. 이전에는 원래 본문이 StreamCache 로 변환되지 않아 본문에서 읽을 수 없거나 스트림을 닫을 수 없었습니다.

3.2.11. Camel Health

이제 상태 점검은 기본적으로 준비 상태 점검만 가능합니다. Camel은 준비 및 활성 점검으로 CamelContextCheck 를 제공하므로 각 검사 중 하나 이상이 있습니다. 기본적으로 소비자 기반 상태 점검만 활성화됩니다.

3.2.11.1. 생산자 상태 점검

camel.health.components-enabled 옵션의 이름이 camel.health.producers-enabled 로 변경되었습니다.

Camel 3.x에서는 이러한 상태 점검이 제대로 작동하지 않고 소스에서 비활성화된 일부 구성 요소(특히 AWS)도 생산자에 대한 상태 점검을 제공합니다. Camel 4에서 이 동작을 계속 진행하려면 생산자 기반 상태 점검이 비활성화됩니다.

camel-kafka 에는 Camel 3에서 작동한 생산자 기반 상태 점검이 포함되어 있으므로 Camel 4의 변경 사항은 이 상태 점검이 비활성화되어 있음을 의미합니다.

application.properties 와 같이 생산자 상태 점검을 전역적으로 활성화해야 합니다.

camel.health.producers-enabled = true
Copy to Clipboard Toggle word wrap

3.2.12. JMX

Camel에는 이제 doCatchdoFinally 의 프로세서 트리에 doCatch에 대한 Cryostat도 포함되어 있습니다.

ManagedChoiceMBeanchoiceStatistics 의 이름이 확장됨으로 변경되었습니다. ManagedFailoverLoadBalancerMBeanexceptionStatistics 의 이름이 확장됨으로 변경되었습니다.

CamelContextMBeanCamelRouteMBean 에서 메서드 dumpRouteAs Cryostat(boolean resolvePlaceholders, boolean resolveDelegateEndpoints) 를 제거했습니다.

3.2.13. YAML DSL

이전 버전과 호환되는 Camel 3.14 이상에서는 하위 경로가 제거되었으므로 단계를 수행할 수 있습니다.

새 구문은 다음과 같습니다.

- route:
    from:
      uri: "direct:info"
      steps:
      - log: "message"
Copy to Clipboard Toggle word wrap

3.2.14. Backlog 추적

이제 시작 시 추적기를 시작하도록 backlogTracing=true 옵션이 자동으로 활성화됩니다. 이전 버전에서는 추적기를 사용할 수 있었으며 나중에 수동으로 활성화해야 했습니다. 이전 동작은 backlogTracingStandby=true 를 설정하여 보관할 수 있습니다.

camel-management-api JAR의 org.apache.camel.api.management.mbean.BacklogTracerEventMessage 에서 camel-api JAR의 org.apache.camel.spi.BacklogTracerEventMessage 로 다음 클래스를 이동합니다.

org.apache.camel.impl.debugger.DefaultBacklogTracerEventMessage 는 추적된 메시지에 대한 몇 가지 추가 세부 정보를 사용하여 org.apache.camel.spi.BacklogTracerEventMessage 인터페이스로 리팩토링되었습니다. 예를 들어 Camel은 이제 입력 및 발신( Out 인 경우) 메시지가 포함된 첫 번째마지막 추적을 캡처합니다.

3.2.15. XML serialization

ModelTo XMLDumper 를 사용한 기본 xml 직렬화가 개선되었으며 이제 camel-jaxb 의 기반이 되는 CryostatB 대신 camel-xml-io 모듈에 있는 생성된 xml serializer를 사용합니다.

3.2.16. OpenAPI Maven 플러그인

이제 camel-restdsl-openapi-plugin Maven 플러그인은 Quarkus와 함께 즉시 작동하는 더 나은 기본값이므로 생성된 Rest DSL 코드의 기본 나머지 구성 요소로 platform-http 를 사용합니다.

3.2.17. 구성 요소 변경

3.2.17.1. 카테고리

org.apache.camel.Category 에 대한 열거 수가 83에서 37로 감소했습니다. 즉, 제거된 값을 사용하는 사용자 지정 구성 요소가 나머지 값 중 하나를 선택해야 합니다. Camel 커뮤니티에서 모든 구성 요소의 카테고리 수를 통합하기 위해 이 작업을 수행했습니다.

3.2.17.2. camel-openapi-rest-dsl-generator

이 dsl-generator는 기본 모델 클래스 (apicurio-data-models)를 1.1.27에서 2.0.3으로 업데이트했습니다.

3.2.17.3. Camel-atom

camel-atom 구성 요소가 3rd party atom 클라이언트를 Apache Abdera에서 RSS Cryostat로 변경했습니다. 즉, feed 오브젝트가 org.apache.abdera.model.Feed 에서 com.apptasticsoftware.rssreader.Item 로 변경됩니다.

3.2.17.4. camel-azure-cosmosdb

항목을 업데이트 했습니다. 이제 더 이상 PartitionKey가 아닌 문자열입니다. 자세한 내용은 CAMEL-19222에서 참조하십시오.

3.2.17.5. Camel-bean

메서드 옵션을 사용하여 특정 메서드를 참조하고 매개 변수 유형 및 값을 사용하는 경우 "bean:myBean? method =foo(com.foo.MyOrder, true)"와 같은 클래스 유형을 이제 . class 구문 i.e. com.foo.MyOrder를 사용해야 합니다. com.foo.MyOrder 는 이제 com.foo.MyOrder.class 여야 합니다.

"bean:myBean?method=foo(com.foo.MyOrder.class, true)"
Copy to Clipboard Toggle word wrap

이는 String, int와 같은 Java 유형에도 적용됩니다.

"bean:myBean?method=bar(String.class, int.class)"
Copy to Clipboard Toggle word wrap
3.2.17.6. Camel-box

일부 메서드 서명 변경 사항이 있는 Box Java SDK v2에서 v4로 업그레이드되었습니다. 파일 모음을 가져오는 방법은 더 이상 사용할 수 없습니다.

3.2.17.7. Camel-caffeine

keyType 매개변수가 제거되었습니다. 이제 캐시의 Key는 문자열 유형일 뿐입니다. CAMEL-18877에 대한 자세한 정보

3.2.17.8. camel-fhir

기본 hapi-fhir 라이브러리가 4.2.0에서 6.2.4로 업그레이드되었습니다. Delete API 메서드만 변경되었으며 이제 org.hl7 .fhir.instance.model.api.IBaseOperationOutcome 대신 ca.uhn.rest.api.Method Outcome을 반환합니다. 기본 변경 사항의 자세한 목록은 hapi-fhir 에서 참조하십시오( Camel에서 hapi-fhir 클라이언트만 사용됨).

3.2.17.9. Camel-google

API 기반 구성 요소 camel-google-drive,camel-google-calendar,camel-google-sheetscamel-google-mail 이 Google Java SDK v1에서 v2로 업그레이드되었으며 최신 API 리버전으로 업그레이드되었습니다. camel-google-drivecamel-google-sheets 에는 일부 API 방법이 변경되었지만 다른 API 방법은 이전과 동일합니다.

3.2.17.10. camel-http

구성 요소가 기본 클라이언트 구성 방식에 영향을 미치는 Apache CryostatComponents v5를 사용하도록 업그레이드되었습니다. 초기 3(connectionRequestTimeout,connectTimeoutsocketTimeout) 대신 4개의 다른 시간 초과(connectionRequestTimeout,connectTimeoutresponseTimeout)와 일부의 기본값이 변경되었습니다. 자세한 내용은 설명서를 참조하십시오.

socketTimeout 이 가능한 구성 매개 변수에서 제거되었으므로 대신 responseTimeout 을 사용합니다.

마지막으로, SocketConfig 에 포함된 매개변수와 함께 옵션 soTimeouthttpConnection로 접두사를 붙여야 합니다.. . 나머지 매개변수는 이전과 같이 httpClient 가 접두사로 묶어야 합니다.

3.2.17.11. camel-http-common

org.apache.camel.http.common.HttpBinding 의 API는 재사용 가능하도록 약간 변경되었습니다. parseBody 메서드는 이제 Cryostat ServletRequest 에서 입력 매개 변수로 사용합니다. 또한 모든 CryostatMessage 가 일반 메시지 유형으로 변경되었습니다.

3.2.17.12. Camel-kubernetes

io.fabric8:kubernetes-client 라이브러리가 업그레이드되었으며 더 이상 사용되지 않는 일부 API 사용이 제거되었습니다. 이전에 교체가 붙은 작업 앞에 update 가 붙습니다.

예를 들어 replaceConfigMap 은 이제 updateConfigMap 이므로replacePod 는 이제 updatePod 등입니다. KubernetesOperations 의 해당 상수도 이름이 변경됩니다. REPLACE_CONFIGMAP_OPERATIONUPDATE_CONFIGMAP_OPERATION,REPLACE_POD_OPERATIONUPDATE_POD_OPERATION 이 되었습니다.

3.2.17.13. camel-web3j

camel-web3j 는 많은 API가 변경된 web3j JAR를 3.x에서 5.0으로 업그레이드했기 때문에 일부 이전 API 호출은 오래 제공되지 않습니다.

3.2.17.14. Camel-main

다음 상수는 BaseMainSupport / Main에서 Main Constants 로 이동했습니다.

Expand
오래된 이름새 이름

Main.DEFAULT_PROPERTY_PLACEHOLDER_LOCATION

MainConstants.DEFAULT_PROPERTY_PLACEHOLDER_LOCATION

Main.INITIAL_PROPERTIES_LOCATION

MainConstants.INITIAL_PROPERTIES_LOCATION

Main.OVERRIDE_PROPERTIES_LOCATION

MainConstants.OVERRIDE_PROPERTIES_LOCATION

Main.PROPERTY_PLACEHOLDER_LOCATION

MainConstants.PROPERTY_PLACEHOLDER_LOCATION

3.2.17.15. Camel-micrometer

메트릭은 Micrometer 이름 지정 규칙을 따르도록 이름이 변경되었습니다.

Expand

오래된 이름

새 이름

CamelExchangeEventNotifier

camel.exchange.event.notifier

CamelExchangesFailed

camel.exchanges.failed

CamelExchangesFailuresHandled

camel.exchanges.failures.handled

CamelExchangesInflight

camel.exchanges.external.redeliveries

CamelExchangesSucceeded

camel.exchanges.succeeded

CamelExchangesTotal

camel.exchanges.total

CamelMessageHistory

camel.message.history

CamelRoutePolicy

camel.route.policy

CamelRoutePolicyLongTask

camel.route.policy.long.task

CamelRoutesAdded

camel.routes.added

CamelRoutesRunning

camel.routes.running

3.2.17.16. Camel-jbang

camel 종속 항목의 이름이 camel 종속성 으로 변경되었습니다.

Camel에서 initrun-dir 매개변수는 다른 모든 옵션과 마찬가지로 2개의 대시 --dir 이 필요하므로 이름이 변경되었습니다.

camel stop 명령은 기본적으로 모든 실행 중인 통합을 중지합니다( -all 옵션이 제거됨).

Placeholders 대체$name 구문 대신 #name 을 사용하도록 변경됩니다.

3.2.17.17. camel-openapi-java

io.apicurio.datamodels 대신 io.swagger.v3 라이브러리를 사용하도록 camel-openapi-java 구성 요소가 변경되었습니다. 그 결과 공개 메서드 org.apache.camel.openapi.RestOpenApi Cryostat.read()의 반환 유형은 이제 io.swagger.v3.oas.models.OpenAPI 대신 io.apicurio.datamodels.openapi.models.OasDocument 입니다. OpenAPI 2.0(swagger) 사양을 구문 분석하면 swagger 구문 분석기에 의해 OpenAPI 3.0.x로 자동 업그레이드됩니다. 이 버전은 OpenAPI 3.1.x 사양도 지원합니다.

3.2.17.18. Camel-optaplanner

camel-optaplanner 구성 요소는 Performver Manager를 사용하도록 변경되었습니다. Camel 3에서 SoverManager 를 사용하는 경우 더 이상 경로에 부울 useSolverManager가 필요하지 않습니다. 더 이상 사용되지 않는 ProblemFactChangeProblemChange 로 교체되었습니다.

새 URI 경로는 다음과 같습니다.

from("optaplanner:myProblemName")
  .to("...")
Copy to Clipboard Toggle word wrap

Optaplanner controlPlaneverManager는 다음 두 가지 방법으로 전달할 수 있습니다.

  • 예를 들면 #parameter
  • 헤더로

Quarkus에서 camel-optaplanner 를 실행할 때 Quarkus를 사용하여 QuarkusManager를 생성합니다.

기존 Camel Optaplanner 경로를 마이그레이션할 수 있으므로 Camel Optaplanner는 아래 코드에 표시된 XML 구성 파일을 제공하여 기존 경로에 대한 PerformverManager 생성을 처리할 수 있습니다.

Optaplanner Routes XML 구성 파일 제공

from("optaplanner:myProblemName?configFile=PATH/TO/CONFIG.FILE.xml")
  .to("...")
Copy to Clipboard Toggle word wrap

참고
solver Daemon 솔루션은 controlPlaneverManager를 사용하도록 마이그레이션해야 합니다.
3.2.17.19. camel-platform-http-vertx

경로 또는 소비자가 일시 중지되면 http 상태 503이 이제 404 대신 반환됩니다.

3.2.17.20. camel-salesforce

생성된 DTO의 Blob 필드의 속성 이름에는 더 이상 'Url'이 수정되어 있지 않습니다. 예를 들어 ContentVersionUrl 속성은 이제 ContentVersion 입니다.

3.2.17.21. camel-slack

슬랙 소비자의 기본 지연은 Slack에 의해 자주 제한되는 것을 방지하기 위해 0.5s에서 10s로 변경됩니다.

3.2.17.22. camel-micrometer-starter

이제 uri 태그는 동적 값이 있는 URI로 인해 생성되는 태그가 너무 많이 생성될 수 있으므로 동적 대신 정적입니다. 이 설정은 camel.metrics.uriTagDynamic=true 를 설정하여 다시 활성화할 수 있습니다.

3.2.17.23. camel-platform-http-starter

platform-http-starter 가 HTTP 서버를 직접 사용하기 위해 camel-servlet 을 사용하여 변경되었습니다. 따라서 모든 HTTP 끝점에 더 이상 서블릿 컨텍스트 경로(기본값은 camel)가 접두사가 지정되지 않습니다.

예를 들면 다음과 같습니다.

HTTP 끝점

from("platform-http:myservice")
  .to("...")
Copy to Clipboard Toggle word wrap

context-path가 사용되지 않으므로 끝점을 http://localhost:8080/myservice 로 호출할 수 있습니다.

참고

platform-http-starter 는 Rest DSL과 함께 사용할 수도 있습니다.

경로 또는 소비자가 일시 중지되면 http 상태 503이 이제 404 대신 반환됩니다.

3.2.17.24. Camel-twitter

camel-twitter 구성 요소는 Twitter4j 버전 4.1.2를 사용하도록 업데이트되었으며 일부 클래스에서 사용하는 패키지를 이동했습니다. Twitter 상태와 같은 특정 twitter 관련 데이터에 액세스하는 경우 twitter4j.Status 에서 사용되는 패키지를 twitter4j.v1.Status 로 업데이트해야 합니다.

3.3. Apache Camel 3으로 마이그레이션

이 가이드에서는 Red Hat Fuse 7에서 Camel 3으로 마이그레이션하는 방법에 대한 정보를 제공합니다.

참고

모듈식화 및 XML 스키마 변경과 같은 구성 요소에서 Fuse 7과 Camel 3 간에는 중요한 차이점이 있습니다. 자세한 내용은 각 구성 요소 섹션을 참조하십시오.

Red Hat build of Apache Camel for Quarkus는 Camel 버전 4를 지원합니다. 이 섹션에서는 Red Hat Fuse 7 애플리케이션을 Camel 버전 3을 사용하여 Red Hat build of Apache Camel for Quarkus로 마이그레이션할 때 Camel 업그레이드에 대한 정보를 제공합니다.

3.3.1. Java 버전

Camel 3은 Java 17 및 Java 11을 지원하지만 Java 8은 지원하지 않습니다.

3.3.1.1. JDK 11에서 CryostatB 제거

Java 11에서 JDK에서 제거 되었으므로 Maven 종속성으로 추가해야 합니다( XML DSL 또는 camel-jaxb 구성 요소를 사용할 때와 같은 경우).

<dependency>
    <groupId>javax.xml.bind</groupId>
    <artifactId>jaxb-api</artifactId>
    <version>2.3.1</version>
</dependency>

<dependency>
    <groupId>com.sun.xml.bind</groupId>
    <artifactId>jaxb-core</artifactId>
    <version>2.3.0.1</version>
</dependency>

<dependency>
    <groupId>com.sun.xml.bind</groupId>
    <artifactId>jaxb-impl</artifactId>
    <version>2.3.2</version>
</dependency>
Copy to Clipboard Toggle word wrap
참고

Java Platform Standard Edition 11 개발 키트(JDK 11)는 릴리스 버전 Camel 3.x에서 더 이상 사용되지 않으며 릴리스 버전 4.x에서는 지원되지 않습니다.

3.3.2. camel-core의 모듈화

Camel 3.x에서는 camel-core 가 다음과 같이 많은 JAR로 분할되었습니다.

  • camel-api
  • Camel-base
  • camel-caffeine-lrucache
  • Camel-cloud
  • Camel-core
  • camel-jaxp
  • Camel-main
  • camel-management-api
  • Camel-management
  • Camel-support
  • Camel-util
  • camel-util-json

Apache Camel의 Maven 사용자는 camel-main 을 제외한 모든 모듈에 대한 전달적 종속성이 있는 종속성 camel-core 를 계속 사용할 수 있으므로 마이그레이션이 필요하지 않습니다.

3.3.3. 구성 요소의 모듈화

Camel 3.x에서는 일부 camel-core 구성 요소가 개별 구성 요소로 이동합니다.

  • Camel-attachments
  • Camel-bean
  • Camel-browse
  • camel-controlbus
  • camel-dataformat
  • Camel-dataset
  • Camel-direct
  • camel-directvm
  • Camel-file
  • Camel- language
  • Camel-log
  • Camel-mock
  • Camel-ref
  • Camel-rest
  • Camel-saga
  • camel-scheduler
  • Camel-seda
  • camel-stub
  • Camel-timer
  • camel-validator
  • camel-vm
  • Camel-xpath
  • Camel-xslt
  • camel-xslt-saxon
  • camel-zip-deflater

3.3.4. 애플리케이션당 여러 CamelContexts가 지원되지 않음

여러 CamelContexts 지원이 제거되었으며 배포당 하나의 CamelContext만 권장되고 지원됩니다. 따라서 @EndpointInject,@Produce,@Consume 등과 같은 다양한 Camel 주석의 컨텍스트 속성이 제거되었습니다.

3.3.5. 더 이상 사용되지 않는 API 및 구성 요소

Camel 3에서는 더 이상 사용되지 않는 모든 API 및 구성 요소가 Camel 2.x에서 제거되었습니다.

3.3.5.1. 제거된 구성 요소

Camel 2.x에서 더 이상 사용되지 않는 모든 구성 요소는 Camel 3.x에서 제거됩니다.

camel-http , camel-hdfs , camel-mina , camel-mongodb , Camel-netty , camel-netty-http , camel-quartz , camel-restlet , camel-rx , camel-jibx , Camel-boon dataformat , Camel-linkedin
Linkedin API 는 더 이상 지원되지 않습니다.
camel-zookeeper
구성 요소 경로 정책 기능이 제거됩니다. 대신 Zoo CryostatClusterService 또는 camel-zookeeper-master 를 사용합니다.
Camel-jetty
더 이상 생산자 (제거됨)를 지원하지 않습니다. 대신 camel-http 구성 요소를 사용합니다.
twitter-streaming
더 이상 사용되지 않는 Twitter Streaming API에 의존하여 더 이상 작동하지 않습니다.
3.3.5.2. 구성 요소 이름 변경

다음 구성 요소는 Camel 3.x에서 이름이 변경됩니다.

camel-microprofile-metrics
camel-micrometer로 변경
테스트
데이터 세트 테스트로 이름을 바꾸고 camel- core 에서 camel-dataset JAR로 이동했습니다.
http4
http 로 이름이 변경되고 org.apache.camel.component.http4 에서 org.apache.camel.component.http 로 해당 구성 요소 패키지입니다. 지원되는 스키마는 이제 httphttps 입니다.
hdfs2
이름이 hdfs 로 변경되고 org.apache.camel.component.hdfs2 에서 org.apache.camel.component.hdfs 로 해당 구성 요소 패키지입니다. 지원되는 스키마는 이제 hdfs 입니다.
mina2
이름을 mina 로 변경하고 org.apache.camel.component.mina2 에서 org.apache.camel.component.mina 로 해당 구성 요소 패키지로 변경합니다. 지원되는 스키마는 이제 mina 입니다.
mongodb3
이름을 mongodb mongodb로 바꾸고 org.apache.camel.component.mongodb3 에서 org.apache.camel.component.mongodb 로 해당 구성 요소 패키지입니다. 지원되는 스키마는 이제 mongodb 입니다.
netty4-http
netty-http 로 이름이 변경되었으며 org.apache.camel.component.netty4.http 에서 org.apache.camel.component.netty.http 로 해당 구성 요소 패키지입니다. 지원되는 스키마는 이제 netty-http 입니다.
netty4
netty 로 이름이 변경되고 org.apache.camel.component.netty4 에서 해당 구성 요소 패키지는 org.apache.camel.component.netty 로 변경되었습니다. 지원되는 스키마는 이제 netty 입니다.
quartz2
이름이 quartz 으로 변경되고 org.apache.camel.component.quartz2 에서 org.apache.camel.component.quartz 로 해당 구성 요소 패키지입니다. 지원되는 스키마는 이제 quartz 입니다.
rxjava2
rxjava 로 이름이 변경되었으며 org.apache.camel.component.rxjava2 에서 org.apache.camel.component.rxjava 로 해당 구성 요소 패키지입니다.
camel-jetty9
camel-jetty 로 이름이 변경되었습니다. 지원되는 스키마는 이제 jetty 입니다.

3.3.6. Camel 구성 요소 변경

3.3.6.1. mock 구성 요소

mock 구성 요소는 camel-core 로부터 이동되었습니다. 이 때문에 어설션 절 빌더 에 대한 여러 방법이 제거됩니다.

3.3.6.2. ActiveMQ

activemq-camel 구성 요소를 사용하는 경우 구성 요소 이름이 org.apache.activemq.camel.component.ActiveMQComponent에서 org.apache.camel.component.activemq.ActiveMQComponent 로 변경되는 camel-activemq 구성 요소를 사용하도록 마이그레이션해야 합니다.

3.3.6.3. AWS

구성 요소 camel-aws 는 여러 구성 요소로 나뉩니다.

  • camel-aws-cw
  • Camel-aws-ddb (ddb 및 ddbstreams 구성 요소를 모두 포함)
  • camel-aws-ec2
  • camel-aws-iam
  • Camel-aws-kinesis (Kinesis 및 kinesis 구성 요소를 모두 포함)
  • camel-aws-kms
  • camel-aws-lambda
  • camel-aws-mq
  • camel-aws-s3
  • camel-aws-sdb
  • Camel-aws-ses
  • camel-aws-sns
  • camel-aws-sqs
  • camel-aws-swf
참고

이러한 구성 요소에 대한 특정 종속 항목을 추가하는 것이 좋습니다.

3.3.6.4. Camel CXF

camel-cxf JAR은 Loki vs REST로 나뉩니다. camel-cxf 에서 마이그레이션할 때 다음 목록에서 특정 JAR을 선택하는 것이 좋습니다.

  • camel-cxf-soap
  • camel-cxf-rest
  • camel-cxf-transport

예를 들어 CXF for Cryostat를 사용하는 경우 camel-cxf-soapcamel-cxf-transport 에서 마이그레이션할 때 camel-cxf -transport를 선택합니다.

3.3.6.4.1. Camel CXF에서 변경된 네임스페이스

camel-cxf XML XSD 스키마도 네임스페이스를 변경했습니다.

camel-cxf Cryostat 구성 요소는 새로운 jaxws 하위 패키지로 이동되었습니다. 즉 org.apache.camel.component.cxf 는 이제 org.apache.camel.component.cxf.jaws. 예를 들어 CxfComponent 클래스는 이제 org.apache.camel.component.cxf.jaxws 에 있습니다.

3.3.6.5. FHIR

camel-fhir 구성 요소가 hapi-fhir 종속성을 4.1.0으로 업그레이드했습니다. 기본 FHIR 버전이 R4로 변경되었습니다. 따라서 DSTU3을 명시적으로 설정해야 합니다.

3.3.6.6. Kafka

camel-kafka 구성 요소는 브리징이 Camel 2.x에서 작동하므로 더 이상 필요하지 않으므로 bridgeEndpointcircularTopicDetection 옵션을 제거했습니다. 즉 camel-kafka 는 엔드포인트 uri의 주제로 메시지를 보냅니다. 이를 재정의하려면 새 주제와 함께 KafkaConstants.OVERRIDE_TOPIC 헤더를 사용합니다. 자세한 내용은 camel-kafka 구성 요소 설명서를 참조하십시오.

3.3.6.7. Telegram

camel-telegram 구성 요소가 권한 부여 토큰을 uri-path에서 쿼리 매개변수로 이동했습니다. 예를 들면 migrate

telegram:bots/myTokenHere
Copy to Clipboard Toggle word wrap

다음으로 변경

telegram:bots?authorizationToken=myTokenHere
Copy to Clipboard Toggle word wrap
3.3.6.8. JMX

camel-core 를 종속성으로 사용하여 Camel 독립 실행형을 실행하고, Cryostat를 상자에서 활성화하려는 경우 종속성으로 camel-management 를 추가해야 합니다.

ManagedCamelContext 를 사용하려면 다음과 같이 CamelContext 에서 이 확장을 가져와야 합니다.

ManagedCamelContext managed = camelContext.getExtension(ManagedCamelContext.class);
Copy to Clipboard Toggle word wrap
3.3.6.9. XSLT

XSLT 구성 요소는 camel-core에서 camel-xsltcamel-xslt-saxon 으로 이동했습니다. 구성 요소가 분리되어 있으므로 camel-xslt 는 JDK XSTL 엔진(Xalan)을 사용하기 위한 것이며, camel-xslt-saxon 은 Saxon을 사용할 때 사용됩니다. 즉, Camel 엔드포인트 URI에서 xsltxslt-saxon 을 구성 요소 이름으로 사용해야 합니다. XSLT 집계 전략을 사용하는 경우 Saxon 지원에 org.apache.camel.component.xslt.saxon.XsltSaxonAggregationStrategy 를 사용합니다. 또한 xslt 빌더를 사용하는 경우 org.apache.camel.component.xslt.XsltSaxonBuilder 를 Saxon 지원에 사용합니다. 또한 allowStax 는 JDK XSLT에서 지원되지 않으므로 camel-xslt-saxon 에서만 지원됩니다.

3.3.6.10. XML DSL 마이그레이션

XML DSL이 약간 변경되었습니다.

사용자 정의 로드 밸런서 EIP가 <custom>에서 < custom LoadBalancer>로 변경되었습니다.

XMLSecurity 데이터 형식의 이름이 keyOrTrustStoreParametersId 인 < secureXML > 태그에서 keyOrTrustStoreParametersRef 로 변경되었습니다.

&lt ;zipFile&gt; 데이터 형식의 이름이 < zipfile>으로 변경되었습니다.

3.3.7. Camel Maven 플러그인 마이그레이션

camel-maven-plugin 은 두 개의 maven 플러그인으로 나뉘어져 있습니다.

camel-maven-plugin
Camel-maven-plugin에는 Camel 애플리케이션을 독립 실행형으로 실행 하도록 설계된 실행 목표는 다음과 같습니다. 자세한 내용은 https://camel.apache.org/manual/camel-maven-plugin.html 을 참조하십시오.
camel-report-maven-plugin
camel-report-maven-plugin 은 Camel 엔드포인트 URI 및 경로 적용 범위 보고서 등과 같은 Camel 프로젝트의 보고서를 생성하는 데 사용되는 검증 및 route-coverage 목표를 가지고 있습니다. 자세한 내용은 https://camel.apache.org/manual/camel-report-maven-plugin.html 을 참조하십시오.

4장. Camel Quarkus 프로젝트 마이그레이션

4.1. 프로젝트를 최신 Quarkus 버전으로 업데이트

Maven을 사용하여 프로젝트를 업데이트하고 최신 Quarkus 버전으로 업그레이드하는 것이 좋습니다.

중요

Hibernate ORM 또는 Hibernate Reactive를 사용하는 프로젝트의 경우 Hibernate ORM 5에서 6로의 마이그레이션 빠른 참조를 검토하십시오. 다음 업데이트 명령은 이 가이드의 하위 집합만 다룹니다.

4.1.1. 사전 요구 사항

  • 약 30분
  • JAVA_HOME 에 적절하게 설치된 JDK
  • Apache Maven 3.8.6
  • 선택 옵션으로 Quarkus CLI를 사용하려는 경우
  • Camel Quarkus 버전 2.13 이상을 기반으로 하는 프로젝트입니다.

4.1.2. Maven으로 업데이트

  1. Quarkus 시작 가이드의 Quarkus 확장 레지스트리 클라이언트 구성 섹션에 설명된 대로 확장 레지스트리 클라이언트를 구성합니다.
  2. Maven으로 업데이트합니다.

    프로젝트 디렉터리로 이동하여 프로젝트를 최신 스트림으로 업데이트합니다.

    1. Quarkus Maven 플러그인 버전이 지원되는 최신 Red Hat build of Quarkus 버전과 일치하는지 확인합니다.
    2. 다음 명령을 사용하여 업데이트를 실행합니다.

      mvn io.quarkus.platform:quarkus-maven-plugin:3.8.6:update -N
      Copy to Clipboard Toggle word wrap

      다중 모듈 프로젝트 의 경우 항상 먼저 다음 명령을 시도합니다.

      mvn io.quarkus.platform:quarkus-maven-plugin:3.8.6:update
      Copy to Clipboard Toggle word wrap

      이 명령이 실패하면 대신 이 긴 명령을 시도할 수 있습니다.

      find . -type f -name "pom.xml" -execdir sh -c 'mvn io.quarkus.platform:quarkus-maven-plugin:3.8.6:update -N' \;
      Copy to Clipboard Toggle word wrap
      참고

      OpenRewrite 와 관련된 문제로 인해 마이그레이션 로그에서 경고가 사전 설정됩니다.

      선택 사항

      기본적으로 이 명령은 최신 최신 버전으로 업데이트됩니다. 최신 최신 버전 대신 특정 스트림으로 업데이트하려면 stream 옵션을 이 명령에 추가합니다. 예를 들면 -Dstream=3.2

      참고

      업데이트에는 <packaging> pom</packaging >으로 모듈을 업데이트하지 못하기 때문에 다중 모듈 프로젝트에 많은 오류가 표시될 수 있습니다.

      이러한 모듈이 있는 경우(일반적으로 버전이 포함된) 수동으로 업데이트합니다.

  3. 잠재적인 지침에 대한 업데이트 명령 출력을 분석하고 필요한 경우 제안된 작업을 수행합니다.
  4. diff 도구를 사용하여 모든 변경 사항을 검사합니다.
  5. update 명령으로 업데이트되지 않은 항목의 마이그레이션 가이드를 검토합니다. 프로젝트에 이러한 항목이 있는 경우 이러한 항목에서 권장하는 추가 단계를 구현합니다.
  6. 프로덕션에 배포하기 전에 오류 없이 프로젝트 빌드, 모든 테스트 전달 및 애플리케이션이 필요에 따라 작동하는지 확인합니다.
  7. 업데이트된 Quarkus 애플리케이션을 프로덕션에 배포하기 전에 다음을 확인하십시오.

    • 프로젝트가 오류 없이 빌드됩니다.
    • 모든 테스트를 통과합니다.
    • 애플리케이션이 필요에 따라 작동합니다.

법적 공지

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

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

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

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

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

Red Hat 소개

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

Theme

© 2026 Red Hat