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 both 3.0 to 3.1 and 3.1 to 3.2.
The core has been further modularized and is now split up into three new core modules
This separates the route model from the runtime processors via the reifiers, by having the classes in their own modules.
BreakpointSupport has moved from
These internal classes has been moved to locations that better suit where other similar processors are located.
org.apache.camel.impl.validator.ProcessorValidator moved to
org.apache.camel.processor.validator.ProcessorValidator. The class
org.apache.camel.impl.transformer.ProcessorTransformer moved to
org.apache.camel.processor.transformer.ProcessorTransformer. The class
org.apache.camel.impl.transformer.DataFormatTransformer moved to
org.apache.camel.processor.transformer.DataFormatTransformer. The class
org.apache.camel.impl.validator.ValidatorKey moved to
org.apache.camel.impl.engine.ValidatorKey. The class
org.apache.camel.impl.transformer.TransformerKey moved to
And the class
org.apache.camel.impl.DefaultExecutorServiceManager is moved from
camel-core-engine JAR to
org.apache.camel.impl.engine.DefaultExecutorServiceManager in the
org.apache.camel.processor.ConvertBodyProcessor is moved to
org.apache.camel.support.ConvertBodyProcessor in the
org.apache.camel.impl.engine.DefaultClaimCheckRepository moved to
org.apache.camel.processor.DefaultClaimCheckRepository in the
org.apache.camel.impl.engine.DefaultProducerCache is moved to
org.apache.camel.support.cache.DefaultProducerCache. The class
org.apache.camel.impl.engine.DefaultConsumerCache is moved to
org.apache.camel.support.cache.DefaultConsumerCache. The class
org.apache.camel.impl.engine.EmptyProducerCache is moved to
org.apache.camel.support.cache.EmptyProducerCache. The class
org.apache.camel.impl.engine.ServicePool is moved to
org.apache.camel.support.cache.ServicePool. The class
org.apache.camel.impl.engine.ProducerServicePool is moved to
org.apache.camel.support.cache.ProducerServicePool. The class
org.apache.camel.impl.engine.PollingConsumerServicePool is moved to
org.apache.camel.support.cache.PollingConsumerServicePool. The class
org.apache.camel.impl.engine.EventNotifierCallback is moved to
Camel 3.7 has optimized its type converter system, which can impact 3rd party components which has type converters. Previously the type converter system would attempt to find a type converter that would be capable of converting between two given types (also by walking up the parent classes and super interfaces). But this leads to slower performance, and Camel now relies on there being covnerter methods with the exact combo of converting from/to types.
When converting to milli seconds using the shorthands for time precision with hours, minutes and seconds, then support for fractions is no longer supported. For example
delay=0.5m (half minute) isn’t supported instead use
Support for using unites as
millis has been removed. Units must now also be one of
d for days,
h for hours,
m for minutes,
s for seconds, and
ms for millis (can be omitted). So you can use
1h12m37s42ms for 1 hour, 12 minutes, 37 seconds and 42 milli seconds.
If a custom
org.apache.camel.spi.ProcessorFactory is in use, then the factory should extend the default implementation
org.apache.camel.processor.DefaultProcessorFactory and in the overridden methods, super should be called to let the default implementation create the processor when custom processors is not created.
org.apache.camel.impl.engine.TypedProcessorFactor moved from
camel-base JAR to
org.apache.camel.support.TypedProcessorFactor in the
Advice routes moved the
adviceWith method from
adviceWith methods on
org.apache.camel.builder.AdviceWithRouteBuilder is deprecated in favour of using methods on
Support for using multiple languages in the toD EIP has been removed as it was a rare feature in use, and is causing some problems for maintenance. toD uses simple language by default, but an alternative language can still be specified.
The original URI path has been changed, now the bucket part is simply a required option and it’s not part of the URI anymore.
The event type header is no more an enum, but it is now the explicit event as a
Component uses different serialization mechanism, which is not backwards compatible with the original one. For full compatibility use camel-leveldb-legacy component. (legacy component will be removed in the future)
camel-base JAR is moved from
org.apache.camel.component.mock.InterceptSendToMockEndpointStrategy in the
org.apache.camel.impl.saga.InMemorySagaService is moved to
org.apache.camel.saga.InMemorySagaService. The class
org.apache.camel.impl.saga.InMemorySagaCoordinator is moved to
listTypeConverters operation on
ManagedTypeConverterRegistryMBean has been removed.
We changed some options naming because they were a bit misleading
From kafkaHeaderDeserializer to headerDeserializer
From kafkaHeaderSerializer to headerSerializer
From keySerializerClass to keySerializer
From serializerClass to valueSerializer
For more information, have a look at CAMEL-15770