Este conteúdo não está disponível no idioma selecionado.
Chapter 1. Migrating Apache Camel
1.1. About the Camel migration guide Copiar o linkLink copiado para a área de transferência!
This guide details the changes in the Apache Camel components that you must consider when migrating your application. This guide provides information about following changes.
- Supported Java versions
- Changes to Apache Camel components and deprecated components
- Changes to APIs and deprecated APIs
- Updates to EIP
- Updated to tracing and health checks
1.2. Migrating to Apache Camel 4 Copiar o linkLink copiado para a área de transferência!
This section provides information that can help you migrate your Apache Camel applications from version 3.20 or higher to 4.0.
For information about individual versions, see:
For information about how to upgrade Apache Camel Quarkus, see:
1.2.1. Java versions Copiar o linkLink copiado para a área de transferência!
Apache Camel 4 supports Java 17. Support for Java 11 is dropped.
1.2.2. Removed Components Copiar o linkLink copiado para a área de transferência!
The following components have been removed:
| Component | Alternative component(s) |
|---|---|
| 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-dozer | 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 |
1.2.3. Logging Copiar o linkLink copiado para a área de transferência!
Camel 4 has upgraded logging facade API slf4j-api from 1.7 to 2.0.
1.2.4. JUnit 4 Copiar o linkLink copiado para a área de transferência!
All the camel-test modules that were JUnit 4.x based has been removed. All test modules now use JUnit 5.
1.2.5. API Changes Copiar o linkLink copiado para a área de transferência!
Following APIs are deprecated and removed from version 4:
-
The
org.apache.camel.ExchangePatternhas removedInOptionalOut. -
Removed
getEndpointMap()method fromCamelContext. -
Removed
@FallbackConverteras you should use@Converter(fallback = true)instead. -
Removed
uriattribute on@EndpointInject,@Produce, and@Consumeas you should usevalue(default) instead. For example@Produce(uri = "kafka:cheese")should be changed to@Produce("kafka:cheese") -
Removed
labelon@UriEndpointas you should usecategoryinstead. -
Removed all
asyncCallbackmethods onProducerTemplate. UseasyncSendorasyncRequestinstead. -
Removed
org.apache.camel.spi.OnCamelContextStart. Useorg.apache.camel.spi.OnCamelContextStartinginstead. -
Removed
org.apache.camel.spi.OnCamelContextStop. Useorg.apache.camel.spi.OnCamelContextStoppinginstead. -
Decoupled the
org.apache.camel.ExtendedCamelContextfrom theorg.apache.camel.CamelContext. -
Replaced
adapt()fromorg.apache.camel.CamelContextwithgetCamelContextExtension -
Decoupled the
org.apache.camel.ExtendedExchangefrom theorg.apache.camel.Exchange. -
Replaced
adapt()fromorg.apache.camel.ExtendedExchangewithgetExchangeExtension -
Exchange failure handling status has moved from being a property defined as
ExchangePropertyKey.FAILURE_HANDLEDto a member of the ExtendedExchange, accessible via `isFailureHandled()`method. -
Removed
DiscardandDiscardOldestfromorg.apache.camel.util.concurrent.ThreadPoolRejectedPolicy. -
Removed
org.apache.camel.builder.SimpleBuilder. Was mostly used internally in Camel with the Java DSL in some situations. -
Moved
org.apache.camel.support.IntrospectionSupporttocamel-core-enginefor internal use only. End users should useorg.apache.camel.spi.BeanInspectioninstead. -
Removed
archetypeCatalogAsXmlmethod fromorg.apache.camel.catalog.CamelCatalog. -
The
org.apache.camel.health.HealthCheckmethodisLivenessis now defaultfalseinstead oftrue. -
Added
positionmethod toorg.apache.camel.StreamCache. -
The method
configurefrom the interfaceorg.apache.camel.main.Listenerwas removed -
The
org.apache.camel.support.EventNotifierSupportabstract class now implementsCamelContextAware. -
The type for
dumpRoutesonCamelContexthas changed frombooleantoStringto allow specifying either xml or yaml.
The org.apache.camel.support.PluginHelper gives easy access to various extensions and context plugins, that was available previously in Camel v3 directly from CamelContext.
1.2.6. EIP Changes Copiar o linkLink copiado para a área de transferência!
-
Removed
langattribute for the<description>on every EIPs. -
The
InOnlyandInOutEIPs has been removed. Instead, useSetExchangePatternorTowhere you can specify exchange pattern to use.
1.2.6.1. Poll Enrich EIP Copiar o linkLink copiado para a área de transferência!
The polled endpoint URI is now stored as property on the Exchange (with key CamelToEndpoint) like all other EIPs. Before the URI was stored as a message header.
1.2.6.2. CircuitBreaker EIP Copiar o linkLink copiado para a área de transferência!
The following options in camel-resilience4j was mistakenly not defined as attributes:
| Option |
| bulkheadEnabled |
| bulkheadMaxConcurrentCalls |
| bulkheadMaxWaitDuration |
| timeoutEnabled |
| timeoutExecutorService |
| timeoutDuration |
| timeoutCancelRunningFuture |
These options were not exposed in YAML DSL, and in XML DSL you need to migrate from:
To use following attributes instead:
<circuitBreaker>
<resilience4jConfiguration timeoutEnabled="true" timeoutDuration="2000"/>
...
</circuitBreaker>
<circuitBreaker>
<resilience4jConfiguration timeoutEnabled="true" timeoutDuration="2000"/>
...
</circuitBreaker>
1.2.7. XML DSL Copiar o linkLink copiado para a área de transferência!
The <description> to set a description on a route or node, has been changed from an element to an attribute.
Example
<route id="myRoute" description="Something that this route do"> <from uri="kafka:cheese"/> ... </route>
<route id="myRoute" description="Something that this route do">
<from uri="kafka:cheese"/>
...
</route>
1.2.8. Type Converter Copiar o linkLink copiado para a área de transferência!
The String java.io.File converter has been removed.
1.2.9. Tracing Copiar o linkLink copiado para a área de transferência!
The Tracer and Backlog Tracer no longer includes internal tracing events from routes that was created by Rest DSL or route templates or Kamelets. You can turn this on, by setting traceTemplates=true in the tracer.
The Backlog Tracer has been enhanced and fixed to trace message headers (also streaming types). This means that previously headers of type InputStream was not traced before, but is now included. This could mean that the header stream is positioned at end, and logging the header afterward, may appear as the header value is empty.
1.2.10. UseOriginalMessage / UseOriginalBody Copiar o linkLink copiado para a área de transferência!
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. Previously the original body was not converted to StreamCache which could lead to the body not able to be read or the stream has been closed.
1.2.11. Camel Health Copiar o linkLink copiado para a área de transferência!
Health checks are now by default only readiness checks out of the box. Camel provides the CamelContextCheck as both readiness and liveness checks, so there is at least one of each out of the box. Only consumer based health-checks is enabled by default.
1.2.11.1. Producer Health Checks Copiar o linkLink copiado para a área de transferência!
The option camel.health.components-enabled has been renamed to camel.health.producers-enabled.
Some components (in particular AWS) provides also health checks for producers; in Camel 3.x these health checks did not work properly and has been disabled in the source. To continue this behaviour in Camel 4, the producer based health checks are disabled.
Notice that camel-kafka comes with producer based health-check that worked in Camel 3, and therefore this change in Camel 4, means that this health-check is disabled.
You MUST enable producer health-checks globally, such as in application.properties:
camel.health.producers-enabled = true
camel.health.producers-enabled = true
1.2.12. JMX Copiar o linkLink copiado para a área de transferência!
Camel now also include MBeans for doCatch and doFinally in the tree of processor MBeans.
The ManagedChoiceMBean have renamed choiceStatistics to extendedInformation. The ManagedFailoverLoadBalancerMBean have renamed exceptionStatistics to extendedInformation.
The CamelContextMBean and CamelRouteMBean has removed method dumpRouteAsXml(boolean resolvePlaceholders, boolean resolveDelegateEndpoints).
1.2.13. YAML DSL Copiar o linkLink copiado para a área de transferência!
The backwards compatible mode Camel 3.14 or older, which allowed to have steps as child to route has been removed.
The new syntax is:
- route:
from:
uri: "direct:info"
steps:
- log: "message"
- route:
from:
uri: "direct:info"
steps:
- log: "message"
1.2.14. Backlog Tracing Copiar o linkLink copiado para a área de transferência!
The option backlogTracing=true is now automatically enabled to start the tracer on startup. In the previous versions the tracer was only made available, and had to be manually enabled afterwards. The old behavior can be archived by setting backlogTracingStandby=true.
Move the following class from org.apache.camel.api.management.mbean.BacklogTracerEventMessage in camel-management-api JAR to org.apache.camel.spi.BacklogTracerEventMessage in camel-api JAR.
The org.apache.camel.impl.debugger.DefaultBacklogTracerEventMessage has been refactored into an interface org.apache.camel.spi.BacklogTracerEventMessage with some additional details about traced messages. For example Camel now captures a first and last trace that contains the input and outgoing (if InOut) messages.
1.2.15. XML serialization Copiar o linkLink copiado para a área de transferência!
The default xml serialization using ModelToXMLDumper has been improved and now uses a generated xml serializer located in the camel-xml-io module instead of the JAXB based one from camel-jaxb.
1.2.16. OpenAPI Maven Plugin Copiar o linkLink copiado para a área de transferência!
The camel-restdsl-openapi-plugin Maven plugin now uses platform-http as the default rest component in the generated Rest DSL code, as it is a better default that works out of the box with Quarkus.
1.2.17. Component changes Copiar o linkLink copiado para a área de transferência!
1.2.17.1. Category Copiar o linkLink copiado para a área de transferência!
The number of enums for org.apache.camel.Category has been reduced from 83 to 37, which means custom components that are using removed values need to choose one of the remainder values. We have done this to consolidate the number of categories of all components in the Camel community.
1.2.17.2. camel-openapi-rest-dsl-generator Copiar o linkLink copiado para a área de transferência!
This dsl-generator has updated the underlying model classes (apicurio-data-models) from 1.1.27 to 2.0.3.
1.2.17.3. camel-atom Copiar o linkLink copiado para a área de transferência!
The camel-atom component has changed the 3rd party atom client from Apache Abdera to RSSReader. This means the feed object is changed from org.apache.abdera.model.Feed to com.apptasticsoftware.rssreader.Item.
1.2.17.4. camel-azure-cosmosdb Copiar o linkLink copiado para a área de transferência!
The itemPartitionKey has been updated. It’s now a String a not a PartitionKey anymore. More details in CAMEL-19222.
1.2.17.5. camel-bean Copiar o linkLink copiado para a área de transferência!
When using the method option to refer to a specific method, and using parameter types and values, such as: "bean:myBean?method=foo(com.foo.MyOrder, true)" then any class types must now be using .class syntax, i.e. com.foo.MyOrder should now be com.foo.MyOrder.class.
Example
"bean:myBean?method=foo(com.foo.MyOrder.class, true)"
"bean:myBean?method=foo(com.foo.MyOrder.class, true)"
This also applies to Java types such as String, int.
"bean:myBean?method=bar(String.class, int.class)"
"bean:myBean?method=bar(String.class, int.class)"
1.2.17.6. camel-box Copiar o linkLink copiado para a área de transferência!
Upgraded from Box Java SDK v2 to v4, which have some method signature changes. The method to get a file thumbnail is no longer available.
1.2.17.7. camel-caffeine Copiar o linkLink copiado para a área de transferência!
The keyType parameter has been removed. The Key for the cache will now be only String type. More information in CAMEL-18877.
1.2.17.8. camel-fhir Copiar o linkLink copiado para a área de transferência!
The underlying hapi-fhir library has been upgraded from 4.2.0 to 6.2.4. Only the Delete API method has changed and now returns ca.uhn.fhir.rest.api.MethodOutcome instead of org.hl7.fhir.instance.model.api.IBaseOperationOutcome. See hapi-fhir for a more detailed list of underlying changes (only the hapi-fhir client is used in Camel).
1.2.17.9. camel-google Copiar o linkLink copiado para a área de transferência!
The API based components camel-google-drive, camel-google-calendar, camel-google-sheets and camel-google-mail has been upgraded from Google Java SDK v1 to v2 and to latest API revisions. The camel-google-drive and camel-google-sheets have some API methods changes, but the others are identical as before.
1.2.17.10. camel-http Copiar o linkLink copiado para a área de transferência!
The component has been upgraded to use Apache HttpComponents v5 which has an impact on how the underlying client is configured. There are 4 different timeouts (connectionRequestTimeout, connectTimeout, soTimeout and responseTimeout) instead of initially 3 (connectionRequestTimeout, connectTimeout and socketTimeout) and the default value of some of them has changed. Refer to the documentation for more details.
Note that the socketTimeout has been removed from the possible configuration parameters of HttpClient, use responseTimeout instead.
Finally, the option soTimeout along with any parameters included into SocketConfig, need to be prefixed by httpConnection., the rest of the parameters including those defined into HttpClientBuilder and RequestConfig still need to be prefixed by httpClient. like before.
1.2.17.11. camel-http-common Copiar o linkLink copiado para a área de transferência!
The API in org.apache.camel.http.common.HttpBinding has changed slightly to be more reusable. The parseBody method now takes in HttpServletRequest as input parameter. And all HttpMessage has been changed to generic Message types.
1.2.17.12. camel-kubernetes Copiar o linkLink copiado para a área de transferência!
The io.fabric8:kubernetes-client library has been upgraded and some deprecated API usage has been removed. Operations previously prefixed with replace are now prefixed with update.
For example replaceConfigMap is now updateConfigMap, replacePod is now updatePod etc. The corresponding constants in class KubernetesOperations are also renamed. REPLACE_CONFIGMAP_OPERATION is now UPDATE_CONFIGMAP_OPERATION, REPLACE_POD_OPERATION is now UPDATE_POD_OPERATION etc.
1.2.17.13. camel-web3j Copiar o linkLink copiado para a área de transferência!
The camel-web3j has upgrade web3j JAR from 3.x to 5.0 which has many API changes, and so some previous API calls are no long provided.
1.2.17.14. camel-main Copiar o linkLink copiado para a área de transferência!
The following constants have been moved from BaseMainSupport / Main to MainConstants:
| Old Name | New Name |
|---|---|
| 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 |
1.2.17.15. camel-micrometer Copiar o linkLink copiado para a área de transferência!
The metrics has been renamed to follow Micrometer naming convention .
| Old Name | New Name |
| 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 |
1.2.17.16. camel-jbang Copiar o linkLink copiado para a área de transferência!
The command camel dependencies has been renamed to camel dependency.
In Camel JBang the -dir parameter for init and run goal has been renamed to require 2 dashes --dir like all the other options.
The camel stop command will now by default stop all running integrations (the option --all has been removed).
The Placeholders substitutes is changed to use #name instead of $name syntax.
1.2.17.17. camel-openapi-java Copiar o linkLink copiado para a área de transferência!
The camel-openapi-java component has been changed to use io.swagger.v3 libraries instead of io.apicurio.datamodels. As a result, the return type of the public method org.apache.camel.openapi.RestOpenApiReader.read() is now io.swagger.v3.oas.models.OpenAPI instead of io.apicurio.datamodels.openapi.models.OasDocument. When an OpenAPI 2.0 (swagger) specification is parsed, it is automatically upgraded to OpenAPI 3.0.x by the swagger parser. This version also supports OpenAPI 3.1.x specifications.
1.2.17.18. camel-optaplanner Copiar o linkLink copiado para a área de transferência!
The camel-optaplanner component has been change to use SolverManager. If you were using SoverManager in Camel 3, you don’t need anymore the boolean useSolverManager in the Route. Deprecated ProblemFactChange has been replaced by ProblemChange.
The new URI path is:
from("optaplanner:myProblemName")
.to("...")
from("optaplanner:myProblemName")
.to("...")
You can pass the Optaplanner SolverManager in 2 ways:
- as #parameter
- as header
When running camel-optaplanner on Quarkus, use the Quarkus way of creating the SolverManager.
You can migrate legacy Camel Optaplanner Routes, which will allow Camel Optaplanner to handle creating the SolverManager for those legacy Routes, by providing the XML config file, as show in the code below:
Providing Optaplanner Routes XML config file
from("optaplanner:myProblemName?configFile=PATH/TO/CONFIG.FILE.xml")
.to("...")
from("optaplanner:myProblemName?configFile=PATH/TO/CONFIG.FILE.xml")
.to("...")
- NOTE
- Solver Daemon solutions should be migrated to use SolverManager.
1.2.17.19. camel-platform-http-vertx Copiar o linkLink copiado para a área de transferência!
If the route or consumer is suspended then http status 503 is now returned instead of 404.
1.2.17.20. camel-salesforce Copiar o linkLink copiado para a área de transferência!
Property names of blob fields on generated DTOs no longer have 'Url' affixed. For example, the ContentVersionUrl property is now ContentVersion.
1.2.17.21. camel-slack Copiar o linkLink copiado para a área de transferência!
The default delay (on slack consumer) is changed from 0.5s to 10s to avoid being rate limited to often by Slack.
1.2.17.22. camel-micrometer-starter Copiar o linkLink copiado para a área de transferência!
The uri tags are now static instead of dynamic (by default), as potential too many tags generated due to URI with dynamic values. This can be enabled again by setting camel.metrics.uriTagDynamic=true.
1.2.17.23. camel-platform-http-starter Copiar o linkLink copiado para a área de transferência!
The platform-http-starter has been changed from using camel-servlet to use the HTTP server directly. Therefore, all the HTTP endpoints are no longer prefixed with the servlet context-path (default is camel).
For example:
HTTP endpoint
from("platform-http:myservice")
.to("...")
from("platform-http:myservice")
.to("...")
The endpoint can be called with http://localhost:8080/myservice, as the context-path is not in use.
The platform-http-starter can also be used with Rest DSL.
If the route or consumer is suspended then http status 503 is now returned instead of 404.
1.2.17.24. camel-twitter Copiar o linkLink copiado para a área de transferência!
The camel-twitter component was updated to use Twitter4j version 4.1.2, which has moved the packages used by a few of its classes. If accessing certain twitter-related data, such as the Twit status, you need to update the packages used from twitter4j.Status to twitter4j.v1.Status.
1.3. Migrating to Apache Camel 3 Copiar o linkLink copiado para a área de transferência!
This guide provides information on migrating from Red Hat Fuse 7 to Camel 3
There are important differences between Fuse 7 and Camel 3 in the components, such as modularization and XML Schema changes. See each component section for details.
Red Hat build of Apache Camel for Quarkus supports Camel version 4. This section provides information relating to upgrading Camel when you migrate your Red Hat Fuse 7 application to Red Hat build of Apache Camel for Quarkus with Camel version 3.
1.3.1. Java versions Copiar o linkLink copiado para a área de transferência!
Camel 3 supports Java 17 and Java 11 but not Java 8.
1.3.1.1. JAXB removed in JDK 11 Copiar o linkLink copiado para a área de transferência!
In Java 11 the JAXB modules have been removed from the JDK, therefore you will need to add them as Maven dependencies (if you use JAXB such as when using XML DSL or the camel-jaxb component):
The Java Platform Standard Edition 11 Development Kit (JDK 11) is deprecated in release version Camel 3.x and is not supported in release versions 4.x.
1.3.2. Modularization of camel-core Copiar o linkLink copiado para a área de transferência!
In Camel 3.x, camel-core has been split into many JARs as follows:
- 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
Maven users of Apache Camel can keep using the dependency camel-core which has transitive dependencies on all of its modules, except for camel-main, and therefore no migration is needed.
1.3.3. Modularization of Components Copiar o linkLink copiado para a área de transferência!
In Camel 3.x, some of the camel-core components are moved into individual components.
- 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
1.3.4. Multiple CamelContexts per application not supported Copiar o linkLink copiado para a área de transferência!
Support for multiple CamelContexts has been removed and only one CamelContext per deployment is recommended and supported. The context attribute on the various Camel annotations such as @EndpointInject, @Produce, @Consume etc. has therefore been removed.
1.3.5. Deprecated APIs and Components Copiar o linkLink copiado para a área de transferência!
All deprecated APIs and components from Camel 2.x have been removed in Camel 3.
1.3.5.1. Removed components Copiar o linkLink copiado para a área de transferência!
All deprecated components from Camel 2.x are removed in 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-boondataformat ,camel-linkedin- The Linkedin API is no longer supported.
camel-zookeeper-
The component route policy functionality is removed. Use
ZooKeeperClusterServiceor thecamel-zookeeper-masterinstead. camel-jetty-
No longer supports
producer(which has been removed). Usecamel-httpcomponent instead. twitter-streaming- Removed as it relied on the deprecated Twitter Streaming API and is no longer functional.
1.3.5.2. Renamed components Copiar o linkLink copiado para a área de transferência!
The following components are renamed in Camel 3.x.
camel-microprofile-metrics-
Renamed to
camel-micrometer test-
Renamed to
dataset-testand moved out ofcamel-coreintocamel-datasetJAR. http4-
Renamed to
http, and it’s corresponding component package fromorg.apache.camel.component.http4toorg.apache.camel.component.http. The supported schemes are now onlyhttpandhttps. hdfs2-
Renamed to
hdfs, and it’s corresponding component package fromorg.apache.camel.component.hdfs2toorg.apache.camel.component.hdfs. The supported scheme is nowhdfs. mina2-
Renamed to
mina, and it’s corresponding component package fromorg.apache.camel.component.mina2toorg.apache.camel.component.mina. The supported scheme is nowmina. mongodb3-
Renamed to
mongodb, and it’s corresponding component package fromorg.apache.camel.component.mongodb3toorg.apache.camel.component.mongodb. The supported scheme is nowmongodb. netty4-http-
been renamed to
netty-http, and it’s corresponding component package fromorg.apache.camel.component.netty4.httptoorg.apache.camel.component.netty.http. The supported scheme is nownetty-http. netty4-
Renamed to
netty, and it’s corresponding component package fromorg.apache.camel.component.netty4toorg.apache.camel.component.netty. The supported scheme is nownetty. quartz2-
Renamed to
quartz, and it’s corresponding component package fromorg.apache.camel.component.quartz2toorg.apache.camel.component.quartz. The supported scheme is nowquartz. rxjava2-
Renamed to
rxjava, and it’s corresponding component package fromorg.apache.camel.component.rxjava2toorg.apache.camel.component.rxjava. camel-jetty9-
Renamed to
camel-jetty. The supported scheme is nowjetty.
1.3.6. Changes to Camel components Copiar o linkLink copiado para a área de transferência!
1.3.6.1. Mock component Copiar o linkLink copiado para a área de transferência!
The mock component has been moved out of camel-core. Because of this a number of methods on its assertion clause builder are removed.
1.3.6.2. ActiveMQ Copiar o linkLink copiado para a área de transferência!
If you are using the activemq-camel component, then you should migrate to use camel-activemq component, where the component name has changed from org.apache.activemq.camel.component.ActiveMQComponent to org.apache.camel.component.activemq.ActiveMQComponent.
1.3.6.3. AWS Copiar o linkLink copiado para a área de transferência!
The component camel-aws has been split into multiple components:
- camel-aws-cw
- camel-aws-ddb (which contains both ddb and ddbstreams components)
- camel-aws-ec2
- camel-aws-iam
- camel-aws-kinesis (which contains both kinesis and kinesis-firehose components)
- 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
It is recommended to add specific dependencies for these components.
1.3.6.4. Camel CXF Copiar o linkLink copiado para a área de transferência!
The camel-cxf JAR has been divided into SOAP vs REST. We recommended you choose the specific JAR from the following list when migrating from camel-cxf.
-
camel-cxf-soap -
camel-cxf-rest -
camel-cxf-transport
For example, if you were using CXF for SOAP, then select camel-cxf-soap and camel-cxf-transport when migrating from camel-cxf.
1.3.6.4.1. Camel CXF changed namespaces Copiar o linkLink copiado para a área de transferência!
The camel-cxf XML XSD schemas has also changed namespaces.
| Old Namespace | New Namespace |
|---|---|
The camel-cxf SOAP component is moved to a new jaxws sub-package, that is, org.apache.camel.component.cxf is now org.apache.camel.component.cxf.jaws. For example, the CxfComponent class is now located in org.apache.camel.component.cxf.jaxws.
1.3.6.5. FHIR Copiar o linkLink copiado para a área de transferência!
The camel-fhir component has upgraded it’s hapi-fhir dependency to 4.1.0. The default FHIR version has been changed to R4. Therefore, if DSTU3 is desired it has to be explicitly set.
1.3.6.6. Kafka Copiar o linkLink copiado para a área de transferência!
The camel-kafka component has removed the options bridgeEndpoint and circularTopicDetection as this is no longer needed as the component is acting as bridging would work on Camel 2.x. In other words camel-kafka will send messages to the topic from the endpoint uri. To override this use the KafkaConstants.OVERRIDE_TOPIC header with the new topic. See more details in the camel-kafka component documentation.
1.3.6.7. Telegram Copiar o linkLink copiado para a área de transferência!
The camel-telegram component has moved the authorization token from uri-path to a query parameter instead, e.g. migrate
telegram:bots/myTokenHere
telegram:bots/myTokenHere
to
telegram:bots?authorizationToken=myTokenHere
telegram:bots?authorizationToken=myTokenHere
1.3.6.8. JMX Copiar o linkLink copiado para a área de transferência!
If you run Camel standalone with just camel-core as a dependency, and you want JMX enabled out of the box, then you need to add camel-management as a dependency.
For using ManagedCamelContext you now need to get this extension from CamelContext as follows:
ManagedCamelContext managed = camelContext.getExtension(ManagedCamelContext.class);
ManagedCamelContext managed = camelContext.getExtension(ManagedCamelContext.class);
1.3.6.9. XSLT Copiar o linkLink copiado para a área de transferência!
The XSLT component has moved out of camel-core into camel-xslt and camel-xslt-saxon. The component is separated so camel-xslt is for using the JDK XSTL engine (Xalan), and camel-xslt-saxon is when you use Saxon. This means that you should use xslt and xslt-saxon as component name in your Camel endpoint URIs. If you are using XSLT aggregation strategy, then use org.apache.camel.component.xslt.saxon.XsltSaxonAggregationStrategy for Saxon support. And use org.apache.camel.component.xslt.saxon.XsltSaxonBuilder for Saxon support if using xslt builder. Also notice that allowStax is also only supported in camel-xslt-saxon as this is not supported by the JDK XSLT.
1.3.6.10. XML DSL Migration Copiar o linkLink copiado para a área de transferência!
The XML DSL has been changed slightly.
The custom load balancer EIP has changed from <custom> to <customLoadBalancer>
The XMLSecurity data format has renamed the attribute keyOrTrustStoreParametersId to keyOrTrustStoreParametersRef in the <secureXML> tag.
The <zipFile> data format has been renamed to <zipfile>.
1.3.7. Migrating Camel Maven Plugins Copiar o linkLink copiado para a área de transferência!
The camel-maven-plugin has been split up into two maven plugins:
camel-maven-plugin-
camel-maven-plugin has the
rungoal, which is intended for quickly running Camel applications standalone. See https://camel.apache.org/manual/camel-maven-plugin.html for more information. camel-report-maven-plugin-
The
camel-report-maven-pluginhas thevalidateandroute-coveragegoals which is used for generating reports of your Camel projects such as validating Camel endpoint URIs and route coverage reports, etc. See https://camel.apache.org/manual/camel-report-maven-plugin.html for more information.