Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 27 additions & 26 deletions docs/user-manual/modules/ROOT/pages/camel-3-migration-guide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ xref:camel-3x-upgrade-guide.adoc[Camel 3.x Upgrade Guide].

== Java versions

Camel 3 supports Java 11. Support for Java 8 is best effort for early versions of Camel 3. However at some time in the 3.x lifeline we will drop support for Java 8.
Camel 3 supports Java 11. Support for Java 8 is best effort for early versions of Camel 3. However, at some time in the 3.x lifeline we will drop support for Java 8.

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):
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):

[source,xml]
----
Expand Down Expand Up @@ -52,7 +52,7 @@ In Camel 2.x camel-core was one JAR file, it has now been split up into many JAR
- 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.
However, users who want to trim the size of the classes on the classpath, can use fine grained Maven dependencies on only the modules needed.
However, users who want to trim the size of the classes on the classpath, can use fine-grained Maven dependencies on only the modules needed.
You may find how to do that in the examples.

We have also modularized many of the core components and moved them out of `camel-core` to individual components:
Expand Down Expand Up @@ -109,9 +109,9 @@ Use:

== Multiple CamelContexts per application not supported

Support for multiple CamelContexts has been removed and only 1 CamelContext per deployment is supported.
The latter was not recommended anyway and was also not 100% implemented (for example in camel-cdi).
For Camel 3 only 1 CamelContext per deployment is recommended and supported.
Support for multiple CamelContexts has been removed, and only 1 CamelContext per deployment is supported.
The latter was not recommended anyway and was also not 100% implemented, for example, in `camel-cdi`.
For Camel 3, only 1 `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.

Expand Down Expand Up @@ -149,8 +149,8 @@ The properties component will now use OS environment variables as preferred valu

The `properties` component no longer support using endpoints, such as `properties:myKey`. The properties component is now only a property placeholder service.
You can therefore no longer lookup the properties component via `camelContext.getComponent("properties")`.
Instead you can use `camelContext.getPropertiesComponent()`, which also returns an interface of the properties component as `org.apache.camel.spi.PropertiesComponent`.
The implementation is still named `org.apache.camel.component.properties.PropertiesComponent`, however it should rarely be used, as you should favour using the interface instead.
Instead, you can use `camelContext.getPropertiesComponent()`, which also returns an interface of the properties component as `org.apache.camel.spi.PropertiesComponent`.
The implementation is still named `org.apache.camel.component.properties.PropertiesComponent`, however, it should rarely be used, as you should favour using the interface instead.


=== Removed components
Expand Down Expand Up @@ -193,7 +193,7 @@ We have also renamed `camel-jetty9` to `camel-jetty`. The supported scheme is no

=== Hystrix EIP

The Hystrix EIP has been generalized as circuit breaker to allow to plugin other implementations.
The Hystrix EIP has been generalized as a circuit breaker to allow plugging in other implementations.

In the Java DSL you need to migrate from `.hystrix()` to `.circuitBreaker()`.
And in XML DSL `<hystrix>` should be `<circuitBreaker>`.
Expand Down Expand Up @@ -258,7 +258,7 @@ And the same for `<setProperty>`.

=== <aggregate> EIP in XML DSL

The aggregte EIP have renamed the expressions (not the attributes) for setting correlation size/timeout to avoid a name clash, so migrate:
The aggregate EIP has renamed the expressions (not the attributes) for setting correlation size/timeout to avoid a name clash, so migrate:

[source,xml]
----
Expand Down Expand Up @@ -317,17 +317,17 @@ It is the same for the other EIPs `<delay>`, `<sample>`, and `<throttle>`.

==== camel-cdi

Support for multiple CamelContexts has been removed, and therefore `@ContextName` has been removed. Instead use standard CDI annotations such as `@Named` and `@ApplicationScoped`.
Support for multiple CamelContexts has been removed, and therefore `@ContextName` has been removed. Instead, use standard CDI annotations such as `@Named` and `@ApplicationScoped`.

=== javax.script

The `camel-script` component has been removed and there is no support for javax.script, which is also deprecated in the JDK and to be removed from Java 11 onwards.
The `camel-script` component has been removed, and there is no support for `javax.script`, which is also deprecated in the JDK and to be removed from Java 11 onwards.

=== Attachments API on Message

The attachments API (javax.activation) has been moved out of `org.apache.camel.message` into an extension `org.apache.camel.attachment.AttachmentMessage` from the `camel-attachments` JAR.
The attachments API (`javax.activation`) has been moved out of `org.apache.camel.message` into an extension `org.apache.camel.attachment.AttachmentMessage` from the `camel-attachments` JAR.

To use this API you can get it via the `getMessage` method on `Exchange`:
To use this API, you can get it via the `getMessage` method on `Exchange`:

AttachmentMessage am = exchange.getMessage(AttachmentMessage.class);
am.addAttachment("myAtt", new DataHandler(...));
Expand All @@ -338,16 +338,17 @@ The fault API has been removed from `org.apache.camel.Message` as it was only us

=== getOut on Exchange

The `hasOut` and `getOut` methods on `Exchange` has been deprecated in favour of using `getMessage` instead. (Side note: Camel-core is still using these methods in a few places to be backwards compatible and relies on this logic as Camel was initially designed with the concept of IN and OUT messages inspired by the JBI and SOAP-WS specifications.)
The `hasOut` and `getOut` methods on `Exchange` has been deprecated in favour of using `getMessage` instead.
(Side note: `camel-core` is still using these methods in a few places to be backwards compatible and relies on this logic as Camel was initially designed with the concept of IN and OUT messages inspired by the JBI and SOAP-WS specifications.)

=== OUT message removed from Simple language and Mock component

The simple language has removed the OUT message concepts eg `${out.body}`.
Also the mock component has removed OUT message from its assertion API, eg
Also, the mock component has removed OUT message from its assertion API, eg

mock.message(0).outBody()...

Also the `@OutHeaders` annotation for bean parameter binding has been removed, instead use `@Headers` instead.
Also, the `@OutHeaders` annotation for bean parameter binding has been removed, instead use `@Headers` instead.

=== Mock component

Expand Down Expand Up @@ -376,12 +377,12 @@ The component `camel-aws` has been split into multiple components:
- camel-aws-sqs
- camel-aws-swf

So you'll have to add explicitly the dependencies for these components. From the OSGi perspective, there is still a `camel-aws` Karaf feature, which includes all the components features.
So you'll have to explicitly add the dependencies for these components. From the OSGi perspective, there is still a `camel-aws` Karaf feature, which includes all the components features.

=== FHIR

The camel-fhir component has upgraded it's hapi-fhir dependency to 4.1.0; Karaf support has been dropped until the hapi-fhir Karaf features are fixed and released.
The default FHIR version has been changed to R4. Therefore if DSTU3 is desired it has to be explicitly set.
The default FHIR version has been changed to R4. Therefore, if DSTU3 is desired, it has to be explicitly set.

=== Kafka

Expand Down Expand Up @@ -481,7 +482,7 @@ Before the default value was "DES/CBC/PKCS5Padding".

=== JSon DataFormat

The default JSon library with the JSon dataformat has changed from `XStream` to `Jackson`.
The default JSON library with the JSON dataformat has changed from `XStream` to `Jackson`.

=== Shiro Component

Expand All @@ -497,8 +498,8 @@ is now RSA-SHA256 (before it was RSA-SHA1).

The default encryption key for the XML Security DataFormat has been removed,
so it is now mandatory to supply the key String/bytes if you are using
symmetric encryption. This means that some of the methods are removed that
used the XMLSecurityDataFormat without specifying a key.
symmetric encryption. This means that some methods are removed that
used the `XMLSecurityDataFormat` without specifying a key.

In addition, the default symmetric encryption algorithm has changed from
Triple DES to AES-256 in GCM mode.
Expand Down Expand Up @@ -538,9 +539,9 @@ The APIs on `CamelContext` has been reduced a bit to focus on relevant API for C

=== Checked vs unchecked exceptions

Most of the Camel exception classes have been migrated to be unchecked (e.g. extends `RuntimeException`).
Most of the Camel exception classes have been migrated to be unchecked (e.g., extends `RuntimeException`).

Also the lifecycle of the `start`, `stop` and `suspend`, `resume` methods on `Service` and `SuspendableService` has been changed to not throw checked exceptions.
Also, the lifecycle of the `start`, `stop` and `suspend`, `resume` methods on `Service` and `SuspendableService` has been changed to not throw checked exceptions.

==== Generic Information

Expand Down Expand Up @@ -608,7 +609,7 @@ as property placeholders are already supported via Camel Main, Camel Spring Boot
=== camel-test

If you are using camel-test and override the `createRegistry` method, for example to register beans from the `JndiRegistry` class, then this is no longer necessary, and instead
you should just use the `bind` method from the `Registry` API which you can call directly from `CamelContext`, such as:
you should use the `bind` method from the `Registry` API which you can call directly from `CamelContext`, such as:

context.getRegistry().bind("myId", myBean);

Expand Down Expand Up @@ -732,7 +733,7 @@ The `@FallbackConverter` annotation has been removed, and you should use `@Conve

=== Removed JMX APIs for explaining EIPs, components, etc.

The APIs that could find, and explain EIPs, components, endpoints etc. has been removed. These APIs have little value for production runtimes, and you can obtain this kind of information via the `camel-catalog`. Also the related Camel Karaf commands that used these APIs has been removed.
The APIs that could find, and explain EIPs, components, endpoints, etc. have been removed. These APIs have little value for production runtimes, and you can obtain this kind of information via the `camel-catalog`. Also the related Camel Karaf commands that used these APIs has been removed.

=== Other changes

Expand Down
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
= Apache Camel 3.x Upgrade Guide

This document is for helping you upgrade your Apache Camel application
from Camel 3.x to 3.y. For example if you are upgrading Camel 3.0 to 3.2, then you should follow the guides
from Camel 3.x to 3.y. For example, if you are upgrading Camel 3.0 to 3.2, then you should follow the guides
from both 3.0 to 3.1 and 3.1 to 3.2.

== Upgrading Camel 3.10 to 3.11

=== Bean Language

When using `beanType` (full qualified class name) with the bean language,
then the bean language will *now* lookup in registry and if there is a single instance of the same type, then the existing bean is used.
If not then a new bean is created (same behavior as before).
then the bean language will *now* look up in the registry, and if there is a single instance of the same type, then the existing bean is used.
If not, then a new bean is created (same behavior as before).

=== Aggregate EIP

The aggregate EIP will now always use a worker thread pool for processing outgoing messages.
Previously a worker pool was only created when `parallelProcessing=true`. When having `parallelProcessing=false`
then a single-threaded worker pool is created and used by the aggregator.

Camels routing engine works better when a dedicated worker pool that eliminates a _hack_ that otherwise was needed in other EIPs that
Camels routing engine works better when a dedicated worker pool that eliminates a _hack_ that otherwise was necessary in other EIPs that
was affected if using the aggregator in some special configurations.

=== RemoveHeader EIP
Expand Down Expand Up @@ -54,7 +54,7 @@ The `streamFilter` option should now be configured as endpoint uri parameter, in
=== camel-saxon

The camel-saxon component no longer depends on camel-xslt-saxon.
Any applications in needs of XSLT transformation with saxon should now declare an explicit dependency upon camel-xslt-saxon.
Any applications in need of XSLT transformation with saxon should now declare an explicit dependency upon camel-xslt-saxon.

=== camel-maven-plugin with OSGi blueprint

Expand Down Expand Up @@ -92,14 +92,14 @@ mvn camel-karaf:run

=== camel-sql

Support of deprecated use of named dataSource in the URI has been removed.
Support for deprecated use of named dataSource in the URI has been removed.

You have to use `sql:select * from table where id=# order by name?dataSource=\#myDS` instead of `sql:select * from table where id=# order by name?dataSource=myDS`.

=== Spring Boot Starters

Some of the Camel Spring Boot starters have additional auto configuration options that clashed with component.
Therefore those configurations has renamed their configuration keys:
Some of the Camel Spring Boot starters have additional autoconfiguration options that clashed with component.
Therefore, those configurations have renamed their configuration keys:

|====
| *Old Key prefix* | *New key prefix*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
= Apache Camel 3.x Upgrade Guide

This document is for helping you upgrade your Apache Camel application
from Camel 3.x to 3.y. For example if you are upgrading Camel 3.0 to 3.2, then you should follow the guides
from Camel 3.x to 3.y. For example, if you are upgrading Camel 3.0 to 3.2, then you should follow the guides
from both 3.0 to 3.1 and 3.1 to 3.2.

== Upgrading Camel 3.14.x to 3.14.10
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
= Apache Camel 3.x Upgrade Guide

This document is for helping you upgrade your Apache Camel application
from Camel 3.x to 3.y. For example if you are upgrading Camel 3.0 to 3.2, then you should follow the guides
from Camel 3.x to 3.y. For example, if you are upgrading Camel 3.0 to 3.2, then you should follow the guides
from both 3.0 to 3.1 and 3.1 to 3.2.

== Upgrading Camel 3.17 to 3.18

=== camel-core

Camel will now mask all known secret values when logging endpoint URIs to avoid leaking sensitive details
such as from stacktraces. Previously only a sub set of known _secret_ keys was masked.
such as from stack traces. Previously only a subset of known _secret_ keys was masked.

The type converter from `InputStream` to `byte[]` will now close the input stream after the conversion.

Expand All @@ -23,7 +23,7 @@ to better separate output between text and json based.

=== camel-cxf

The `camel-cxf` JAR has been split up into SOAP vs REST and Spring and non Spring JARs.
The `camel-cxf` JAR has been split up into SOAP vs. REST and Spring and non-Spring JARs.

Users should therefore choose `camel-cxf` to migrate among the following JARs:

Expand All @@ -34,15 +34,15 @@ Users should therefore choose `camel-cxf` to migrate among the following JARs:
- `camel-cxf-transport`
- `camel-cxf-spring-transport`

For example if you were using CXF for SOAP and with Spring XML, then you would need to migrate
For example, if you were using CXF for SOAP and with Spring XML, then you would need to migrate
from using `camel-cxf` to `camel-cxf-spring-soap` and `camel-cxf-spring-transport`.

When using Spring Boot then you need to migrate from `camel-cxf-starter` to use SOAP or REST:
When using Spring Boot, then you need to migrate from `camel-cxf-starter` to use SOAP or REST:

- `camel-cxf-soap-starter`
- `camel-cxf-rest-starter`

The `camel-cxf` XML XSD schemas has also changed namespaces:
The `camel-cxf` XML XSD schemas have also changed namespaces:

|===
|Old Namespace | New Namespace
Expand Down Expand Up @@ -70,8 +70,8 @@ i.e. `org.apache.camel.component.cxf` is now `org.apache.camel.component.cxf.jaw
This means, for example, the `CxfComponent` class is now located
in `org.apache.camel.component.cxf.jaxws`.

Some classes in the following packages were refactored, and the package was updated,
if you were using one of those packages and, after the migration, a ClassNotFoundException is thrown,
Some classes in the following packages were refactored, and the package was updated.
If you were using one of those packages and, after the migration, a `ClassNotFoundException` is thrown,
an update should be considered

|===
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
= Apache Camel 3.x Upgrade Guide

This document is for helping you upgrade your Apache Camel application
from Camel 3.x to 3.y. For example if you are upgrading Camel 3.0 to 3.2, then you should follow the guides
from Camel 3.x to 3.y. For example, if you are upgrading Camel 3.0 to 3.2, then you should follow the guides
from both 3.0 to 3.1 and 3.1 to 3.2.

== Upgrading Camel 3.20.6 to 3.20.7
Expand Down Expand Up @@ -31,7 +31,7 @@ The old behavior can be archived by setting `backlogTracingStandby=true`.

The xref:backlog-tracer.adoc[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.
the header stream is positioned at the end, and logging the header afterward may appear as the header value is empty.

=== camel-micrometer-starter

Expand All @@ -50,7 +50,7 @@ A route now have `<routeProperty>` in the top instead of the bottom.

=== YAML DSL

Using _allowable values_ in Rest with YAML DSL is fixed to use correct name as other DSLs.
Using _allowable values_ in Rest with YAML DSL is fixed to use the correct name as other DSLs.

Before:

Expand Down Expand Up @@ -86,12 +86,12 @@ and configure them via Java code or classic Spring XML `<bean>` style.

=== camel-kafka

The following options has changed default value as they were mistakenly out of sync with Apache Kafka.
The following options have changed default value as they were mistakenly out of sync with Apache Kafka.
This caused camel-kafka producer to not enable idempotence out of the box, that otherwise plain Apache Kafka client would do:

- enableIdempotence: changed from `false` to `true`
- requestRequiredAcks: changed from `1` to `all`
- retries: changed from `0` to _unset_
- `enableIdempotence`: changed from `false` to `true`
- `requestRequiredAcks`: changed from `1` to `all`
- `retries`: changed from `0` to `_unset_`

== Upgrading Camel 3.19 to 3.20

Expand Down Expand Up @@ -123,7 +123,7 @@ Dependencies not intended for end users has been removed, such as all `-parent`

=== camel-base64

The `base64` property placeholder function will now lookup the value as a property key.
The `base64` property placeholder function will now look up the value as a property key.
For example

[source,text]
Expand Down Expand Up @@ -164,7 +164,7 @@ that it is now the same, how error handlers are in other DSLs.

The Mongodb Driver core has been updated to version 4.8.1

This fully support MongoDB 6.1
This fully supports MongoDB 6.1

=== camel-google-pubsub

Expand Down
Loading