4.6. Changes to Camel components
4.6.1. Mock component 复制链接链接已复制到粘贴板!
The mock component has been moved out of camel-core. Because of this a number of methods on its assertion clause builder are removed.
4.6.2. ActiveMQ 复制链接链接已复制到粘贴板!
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.
4.6.3. AWS 复制链接链接已复制到粘贴板!
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.
4.6.4. Camel CXF 复制链接链接已复制到粘贴板!
The camel-cxf JAR has been divided into SOAP vs REST and Spring and non Spring JARs. It is recommended to choose the specific JAR from the following list when migrating from came-cxf.
-
camel-cxf-soap -
camel-cxf-spring-soap -
camel-cxf-rest -
camel-cxf-spring-rest -
camel-cxf-transport -
camel-cxf-spring-transport
For example, if you were using CXF for SOAP and with Spring XML, then select camel-cxf-spring-soap and camel-cxf-spring-transport when migrating from camel-cxf.
When using Spring Boot, choose from the following starter when you migrate from camel-cxf-starter to SOAP or REST:
-
camel-cxf-soap-starter -
camel-cxf-rest-starter
4.6.4.1. Camel CXF changed namespaces 复制链接链接已复制到粘贴板!
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.
4.6.5. FHIR 复制链接链接已复制到粘贴板!
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.
4.6.6. Kafka 复制链接链接已复制到粘贴板!
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.
4.6.7. Telegram 复制链接链接已复制到粘贴板!
The camel-telegram component has moved the authorization token from uri-path to a query parameter instead, e.g. migrate
telegram:bots/myTokenHere
to
telegram:bots?authorizationToken=myTokenHere
4.6.8. JMX 复制链接链接已复制到粘贴板!
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);
4.6.9. XSLT 复制链接链接已复制到粘贴板!
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.
4.6.10. XML DSL Migration 复制链接链接已复制到粘贴板!
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>.