Apache Camel 4.x Upgrade Guide

This document is for helping you upgrade your Apache Camel application from Camel 4.x to 4.y. For example, if you are upgrading Camel 4.0 to 4.2, then you should follow the guides from both 4.0 to 4.1 and 4.1 to 4.2.

Upgrading Camel 4.8 to 4.9

camel-management

The queueSize attribute on endpoints which are ManagedBrowseableEndpoint is changed from returning a Long value to an Integer value.

camel-jms

Added int limit as parameter to the browse method in org.apache.camel.component.jms.QueueBrowseStrategy.

camel-hashicorp-vault properties function

The syntax for retrieving a single field of a secret has been changed.

From this

{{hashicorp:secret:database/username}}

to this

{{hashicorp:secret:database#username}}

You could find more details on CAMEL-21179 issue

camel-aws-secrets-manager properties function

The syntax for retrieving a single field of a secret has been changed.

From this

{{aws:database/username}}

to this

{{aws:database#username}}

You could find more details on CAMEL-21179 issue

camel-google-secret-manager properties function

The syntax for retrieving a single field of a secret has been changed.

From this

{{gcp:database/username}}

to this

{{gcp:database#username}}

You could find more details on CAMEL-21179 issue

camel-azure-key-vault properties function

The syntax for retrieving a single field of a secret has been changed.

From this

{{azure:database/username}}

to this

{{azure:database#username}}

You could find more details on CAMEL-21179 issue

camel-test

The CamelTestSupport class was modified so that the JUnit 5 extension code that was part of the class itself, was moved to a separate class. This is part of the work being done on CAMEL-20837 to modernize the base test code.

In many cases, code should work with no changes provided they are not using any of the API methods that were deprecated in Camel 4.7.0. Additionally, starting with Camel 4.9, we strongly recommend users to avoid relying on single-instance contexts (created via @TestInstance(TestInstance.Lifecycle.PER_CLASS)), as this is considered a deprecated functionality that will be removed in the future. The logs will print a warning message if this behavior is detected.

Removed API

Kotlin DSL

The Kotlin DSL which was deprecated in Camel 4.7.0 has now been removed. The routes must be migrated to another DSL such as Java, Yaml or xml.

The following modules has been removed:

  • camel-kotlin-dsl

  • camel-kotlin-api

Deprecated Components

The following components that were marked as deprecated:

*