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.
| The Camel Upgrade Recipes project provides automated assistance for some common migration tasks. Note that manual migration is still required. See the documentation page for details. |
Upgrading Camel 4.24 to 4.25
camel-a2a - generated agent cards advertise the consumer interface
Generated consumer agent cards now publish a supportedInterfaces entry for the configured protocol binding. A card containing only a legacy url now advertises that URL with the consumer’s binding. Otherwise, when no interface is declared, the advertised URL comes from the HTTP transport. Clients that previously fell back to the card’s source URL, including Camel producers using discovery without configured credentials or a host override, now follow the advertised interface.
If a proxy rewrites the host or mount path, or terminates TLS, check the URL in the served card. If it differs from the address clients must use, configure supportedInterfaces in the consumer’s card with the public URL, binding, and protocol version before upgrading. The same applies if the transport advertises a bind address.
camel-core - intercept no longer intercepts the steps of onCompletion and of other intercepts
The intercept is for the main route path. The onCompletion and the steps inside an onCompletion are no longer intercepted, as the steps of onException, interceptFrom and interceptSendToEndpoint already were not. For example, a route with two steps and an onCompletion with two steps was intercepted 5 times, and is now intercepted 2 times.
The steps of an intercept are no longer intercepted by another intercept either. Before, with several intercept, an intercept also intercepted the steps of the intercept declared after it, so it ran more than once before a step. Now each intercept runs once before each step of the main route path. The order of several intercept is unchanged.
The intercept is now also kept when a route is created again from its definition, such as when CamelContext is stopped and started again, or when a route definition is removed and added again. Before, the intercept was lost.
camel-core - a dynamic uri keeps the uri text of the options that a component evaluates for each message
Some components evaluate an endpoint option as an expression for each message, for example the meter name and the tags. options of camel-micrometer, the keyName of camel-aws2-s3, the parameters. of camel-jpa, or the fileName, move and filterFile options of the file components. With a dynamic uri (toD, enrich and pollEnrich with an expression, and wireTap with a dynamic uri), these options now keep the text that is written in the uri, and the component evaluates that text once for each message, as with a static to. Before, the text that the dynamic uri computed from the message became the option value, and the component then evaluated that text as an expression of its own. A header value with ${…} in it is now used as it is. Routes that put an expression into a header for such an option need to write the expression in the uri instead.
-
Such an option that is not written in the uri, and only comes up in the computed uri (for example because a header value contains
&), now fails with aResolveEndpointFailedException. -
The path options that a component evaluates (the meter name of
camel-micrometerandcamel-opentelemetry-metrics, the bucket ofcamel-aws2-s3and the template ofcamel-sql-stored) keep the text that is written in the uri as well, except withpollEnrich. The other path options, such as the meter type inmicrometer:${header.type}:orders, are computed from the message as before. Withcamel-aws2-s3, a bucket name that is a Simple expression is no longer checked when the endpoint starts. -
With
pollEnrichfrom a file component, the consumer evaluatesmove,moveFailed,preMoveandsortByagainst the polled file, as with a static uri, so a${header.name}in them refers to the headers of the polled file and not to the message being enriched, anddoneFileNamesupports only${file:name}and${file:name.noext}. ThefileName,filterFile,filterDirectoryandidempotentKeyoptions still see the headers of the message being enriched. In the same way, withpollEnrichfromcamel-google-storage,downloadFileNameis evaluated against each downloaded object. -
The options are those marked with
supportSimpleExpressionin the component metadata. They are now also listed by the newEndpointUriFactory.expressionPropertyNames()method, which the build generates for each component.recipientList,routingSlipanddynamicRouterare not changed.
camel-opentelemetry2 - OTEL_BAGGAGE_ headers removed
The deprecated OTEL_BAGGAGE_<name> message headers are no longer converted into OpenTelemetry baggage. Set an Exchange property named CamelBaggage_<name> instead, for example .setProperty("CamelBaggage_tenant.id", constant("1234")), as described in the OpenTelemetry2 component documentation.
camel-netty-http - CamelHttpScheme, CamelHttpHost and CamelHttpPort populated for relative request lines
The camel-netty-http consumer now populates CamelHttpScheme, CamelHttpHost and CamelHttpPort even when the incoming request line is relative (e.g. GET /foo?x=1 HTTP/1.1), which is the standard form used by direct HTTP/1.1 clients.
-
CamelHttpScheme— derived from the consumer’s ssl configuration (httpswhen ssl is enabled,httpotherwise). Previously it wasnullfor relative request lines. -
CamelHttpHost— taken from the HTTPHostheader first; falls back to the consumer’s configured host. Previously it wasnullfor relative request lines. -
CamelHttpPort— the consumer’s configured port. Previously it was 80 or 443 regardless of the actual port.
For absolute-URI request lines (proxy-style: GET http://example.com/foo HTTP/1.1) the behaviour is unchanged: scheme, host and port come from the URI. When the absolute URI carries no port, the conventional default (80 for http, 443 for https) is used as before.
Rest DSL - CORS credentials require a configured origin
When CORS is enabled with Access-Control-Allow-Credentials=true (corsAllowCredentials(true)) and Access-Control-Allow-Origin is left at its default *, the response no longer echoes the Origin of the request and leaves out Access-Control-Allow-Credentials. Camel logs a WARN when the routes start. To allow credentials, configure the allowed origin, for example corsHeaderProperty("Access-Control-Allow-Origin", "https://app.example.com"). This matches what platform-http-vertx and camel-a2a already do.
camel-servlet, camel-jetty, camel-platform-http-vertx - fileNameExtWhitelist rejects file names with no extension
The fileNameExtWhitelist option of the HTTP consumers (camel-servlet, camel-jetty and camel-platform-http-vertx) restricts multipart uploads to the file name extensions listed in it. When a concrete list was configured, an upload whose file name had no extension (for example report) or was a dot-file (for example .config) was still accepted, because the shared check treated a name with no extension as a match. The shared check now rejects a file name with no extension while a concrete list is configured. An unset list and * still accept every upload, and a listed extension is matched exactly and case-insensitively as before. A multipart part that carries no file name at all, such as a plain form field, is not a file upload and is handled as before.
A consumer that set fileNameExtWhitelist and relied on uploads with no extension passing through should widen the list explicitly, for example by adding the expected extensions or by using * to accept every name. This matches the behaviour already applied by camel-platform-http-starter.
camel-langchain4j-agent - deprecate response model header
The CamelLangChain4jAgentResponseModel header is now deprecated because the LangChain4j agent Result does not expose the response model name. The producer did not populate this header, so applications should not rely on it.
camel-langchain4j-agent - trim excluded tool tags and MCP server names
The CamelLangChain4jAgentExcludeTags and CamelLangChain4jAgentExcludeMcpServers headers now correctly handle whitespace around comma-separated names.
Modeline (//DEPS lines in route files) deprecated
Modeline, the JBang style //DEPS lines in route files that camel run reads to download extra dependencies, is deprecated, and will be removed in a future release. Camel logs a WARN for each route file that has //DEPS lines. Declare the dependencies in application.properties instead:
camel.jbang.dependencies=com.example:my-library:1.0,com.example:other-library:2.1 or with camel run --dep. Deprecated with it: the camel-dsl-modeline component, the camel.main.modeline option, CamelContext.setModeline / isModeline, the ModelineFactory SPI and the camel run --modeline option. The camel dependency list and camel dependency update commands keep handling the //DEPS lines of JBang scripts.
camel-azure-schema-registry - deprecated
The camel-azure-schema-registry component is deprecated, and will be removed in a future release. Its only class, DefaultAzureCredentialWrapper, gave the Azure Schema Registry serializers of Kafka a DefaultAzureCredential created by class name; the Kamelets that used it were removed from the Kamelet catalog. Create the credential as a bean with the builder of Azure Identity instead:
- beans:
- name: defaultAzureCredential
type: com.azure.identity.DefaultAzureCredential
builderClass: com.azure.identity.DefaultAzureCredentialBuilder camel-cedar - a fractional number in the context or entity data is rejected
The camel-cedar component converts the context expression result, the entity JSON that a CedarEntityProvider returns, and the static entities of entitiesResource to Cedar values. Cedar has no floating-point type and represents every whole number as a Long. A number that carries a fractional part (for example a Double, Float or BigDecimal such as 100.9) is no longer truncated to a whole number. In the context or in the entities of the provider it now gives the ERROR outcome. In entitiesResource it fails the start, and on a reload the active revision is kept. A whole-valued number such as 100 or 100.0 is still accepted, and a Cedar Decimal, whose digits are written as a string, is unaffected. Use a whole number or a Cedar Decimal for fractional values.
camel-azure-key-vault - EventhubsReloadTriggerTask now checkpoints after processing
EventhubsReloadTriggerTask now writes an Event Hubs checkpoint after each event. Previously no checkpoint was written, so after a restart the task started at EventPosition.latest() and ignored SecretNewVersionCreated events that arrived while the application was down (the application resolves the current secret values when it starts). Now a restart replays the SecretNewVersionCreated events since the last checkpoint, up to the retention of the hub, and a matching event triggers a context reload right after startup.
camel-pqc - default-material accessors and provider resolution
The PQCDefault*Material helper classes now initialize their default cryptographic material lazily. Their backing fields (keyPair, signer, keyGenerator and generator) are private. Application code that accessed those fields directly must migrate to the corresponding accessors, for example getKeyPair(), getSigner(), getKeyGenerator() and getGenerator(). Hybrid material holders expose the specific accessors for their classical and PQC material, such as getClassicalKeyPair(), getClassicalKeyAgreement(), getPqcKeyPair(), getPqcKeyGenerator() and getMaterial().
The no-argument PQCKeyEncapsulationAlgorithms.getBcProvider() and PQCSignatureAlgorithms.getBcProvider() methods are deprecated. Use getBcProvider(serviceType) with the JCA service being requested (KeyPairGenerator, Signature, KeyGenerator, KeyFactory, and so on). Provider selection is now service-specific and can return BC where older code expected BCPQC; applications must not hard-code the provider name for a PQC algorithm.
For a recognized algorithm, KeyAlgorithmSupport.getDefaultParameterSpec() now throws an IllegalStateException when the runtime cannot resolve that algorithm’s configured default parameter set. Previously such a failure could be reported as a missing default (null) and lead to a fallback key size. Unknown algorithm names still return null. Applications should allow a parameter-resolution failure to stop key generation rather than silently use a different key size or parameter set.
The producer body metadata for KEM operations now declares the standard javax.crypto.SecretKey type instead of a Bouncy Castle-specific carrier type. Applications should accept the JCA SecretKey interface; the runtime may still return Bouncy Castle’s encapsulation-carrying implementation when that provider class is available.
camel-pqc - key lifecycle default parameter sets and rotation validation
KeyAlgorithmSupport.generateKeyPair(algorithm, null) and the KeyLifecycleManager implementations no longer fall back to KeyPairGenerator.initialize(256, random) when an algorithm has no default AlgorithmParameterSpec mapping. Calling key generation without an explicit parameterSpec for algorithms without a default parameter set (for example EC) now throws an IllegalArgumentException. In addition, KeyLifecycleManager.rotateKey now rejects calls where oldKeyId equals newKeyId.
camel-pqc - HashicorpVaultKeyLifecycleManager namespace path consistency
When cloud=true and namespace is configured on HashicorpVaultKeyLifecycleManager, key writes, metadata updates, and deletes now use the same <namespace>/<secretsEngine> path prefix as reads and lists. Keys previously written with cloud=true and a namespace were stored under <secretsEngine>/data/… without the namespace prefix, so they will no longer be found at <namespace>/<secretsEngine>/data/… after upgrading and must be re-stored or moved to the namespaced path. If your VaultTemplate already sends the X-Vault-Namespace header, pass cloud=false to avoid double-prefixing the namespace.
camel-kafka, camel-kafka-share - sslContextParameters now configures the complete TLS engine
The Kafka components now create their TLS engines from the complete SSLContext produced by Camel’s sslContextParameters, rather than translating a subset of the parameters into Kafka ssl.* properties. This applies whether the parameters are configured on the endpoint or supplied through the global SSL context (useGlobalSslContextParameters). Key and trust managers, cipher suites, enabled protocols, named groups, signature schemes and Camel’s post-quantum named-group preference (when available) are now applied. A KeyManager supplied directly through KeyManagersParameters is supported.
This changes the precedence of SSL options. When sslContextParameters is configured, all Kafka-specific SSL endpoint options other than sslEndpointAlgorithm, and additionalProperties entries whose names start with ssl., are ignored. Camel logs a warning listing non-default SSL endpoint option names and ignored additional-property names, without logging their values. The sslEndpointAlgorithm option continues to control broker hostname verification. Applications that previously overrode SSL settings from sslContextParameters with Kafka SSL endpoint options or additionalProperties must move those settings into the endpoint’s own sslContextParameters. This is especially important when a global SSL context is used and an endpoint previously selected a different trust store.
Because Kafka now uses the Camel-created SSLContext, explicit namedGroups and signatureSchemes are applied. A broker that cannot negotiate one of the explicitly configured named groups may no longer connect. The automatic post-quantum named-group preference is also applied when supported by the JVM. The jdk.tls.namedGroups, jdk.tls.client.SignatureSchemes and jdk.tls.server.SignatureSchemes system-property workaround documented for Kafka in the 4.24 upgrade guide is no longer needed when using sslContextParameters; those JVM-wide properties may still be relevant to other TLS clients.
Without sslContextParameters, the existing Kafka ssl.* endpoint options and additionalProperties behavior is unchanged.
camel-openai - oauthProfile takes precedence over apiKey
When both oauthProfile and apiKey are set on a camel-openai endpoint, oauthProfile now takes precedence and the apiKey is ignored. Before, apiKey took precedence over oauthProfile. This reversal matches the option descriptions and the behaviour of the other AI components. Applications that intentionally configured both options relying on apiKey taking precedence must remove the oauthProfile option or set it to empty to restore the previous resolution order.
Additionally, a misconfigured oauthProfile on the OpenAI API client (the oauthProfile option on the endpoint itself, not on a nested mcpServer.*) will only be reported on the first exchange rather than at route startup. This is an intentional trade-off that enables short-lived token refresh.
camel-docling - the OAuth token of oauthProfile is resolved per request
With oauthProfile, the endpoint used to resolve the access token once at startup and bake it into the docling-serve client. The token is now resolved from the camel-oauth cache on every outbound request so that short-lived tokens are automatically renewed when they expire without restarting the route. The identity provider must issue tokens that docling-serve accepts as Bearer credentials.
The trade-off: a misconfigured profile name, a missing camel-oauth dependency, or an unreachable identity provider used to fail the route at startup and now causes an exception on the first exchange. The exception is handled by the route’s error handler like any other exchange failure.
If authenticationScheme=API_KEY and authenticationToken are also set together with oauthProfile, the OAuth token is now sent as Authorization: Bearer while the static token is sent as X-Api-Key. Previously the OAuth token was resolved once at startup and also sent as X-Api-Key. Both headers are sent when both are configured; use oauthProfile alone (without authenticationScheme or authenticationToken) to send only the Bearer token.
Camel CLI - the Azure Storage Queue dev service runs on Floci AZ
camel infra run azure storage-queue now starts the Queue service of Floci AZ instead of Azurite, as the other Azure dev services already did. Floci AZ serves all its services on port 4577, and the Queue service of the devstoreaccount1 account under /devstoreaccount1-queue. A client of the dev service, such as a QueueServiceClient set in the serviceClient option of azure-storage-queue, needs the address http://localhost:4577/devstoreaccount1-queue instead of http://localhost:10001/devstoreaccount1. The account name and key do not change. The Blob dev service still runs on Azurite.
camel-alibaba-eventbridge - a CloudEvent body cannot carry extensions that reuse reserved attribute names
When the body sent to the alibaba-eventbridge producer is a CloudEvent instance, its extensions map must not contain a key that reuses a reserved CloudEvents core attribute name (id, source, specversion, type, datacontenttype, dataschema, subject, time, data or data_base64), compared case-insensitively. The Alibaba SDK serializes a request by flattening each extension up to a top-level attribute, so such an extension would replace the dedicated attribute of the same name that the producer set and validated. The producer now rejects such an event with an IllegalArgumentException.
The producer also writes the resolved event bus, source and type back onto a CloudEvent body before it is sent, so the request carries exactly the values that were validated. The CloudEvent instance given as the body is updated in place: the bus is written onto the aliyuneventbusname extension, the only bus key the SDK serializes on the wire, on a copy of the extensions map from which the aliyunEventBus and eventBusName hint keys are removed, and the source and type onto the dedicated fields. A bus, source or type that was resolved from the endpoint options, or a bus taken from one of the two hint keys, is therefore now serialized and sent rather than validated and silently dropped.
Routes that copy arbitrary key/value pairs into a CloudEvent extensions map should drop these reserved names before sending. The Map and JSON-text body forms build a fresh event and are not affected.
camel-alibaba-eventbridge - the client that the endpoint creates sends its requests over HTTPS
The client that the alibaba-eventbridge endpoint creates now sends its requests to EventBridge over HTTPS. Before, it sent them over HTTP, the protocol that EventBridgeClient of the SDK uses when its Config sets none. The new tls option, true by default, sets the protocol.
A route whose endpoint option names a host that accepts only HTTP needs tls=false now. A client that is set or autowired in the eventBridgeClient option keeps its own protocol.
camel-pinecone - the tls option now defaults to true
The tls endpoint option of camel-pinecone now defaults to true, so the data plane (gRPC) connection to the index uses TLS, matching the default of the Pinecone client. Before, it defaulted to false.
A route that connects to a local server that does not use TLS, such as Pinecone Local, must now set tls=false explicitly. A route that connects to an index in the Pinecone cloud needs no change. The control plane (REST) is unaffected: it still uses the scheme of the host option.
camel-alibaba-sms - sendSms fails the exchange for a Code other than OK
The sendSms operation of alibaba-sms now fails the exchange for a response with a Code other than OK. A response without a Code or without a body fails the exchange too. Short Message Service gives some error codes, such as InternalError, the HTTP status 200. Only the Code OK means success. Before, the exchange completed, and the code key of the body held the error code.
The exception is a com.aliyun.tea.TeaException in the form that the SDK throws for an HTTP status from 400 to 599. getCode() gives the Code, getStatusCode() the HTTP status, and getData() the fields of the response, such as BizId and RequestId. So one onException(TeaException.class) handles a Code other than OK and an HTTP status from 400 to 599. The body then stays as it was, and the producer does not set the CamelAlibabaSmsRequestId header.
A route that tests the code key of the body for an error needs onException, or doTry and doCatch, now. An error handler that redelivers now sends such a request again. A test that mocks the client must return a body with the Code OK for a send that succeeds.
camel-alibaba-oss - listBuckets returns every bucket, and listObjects uses ListObjectsV2
The listBuckets operation of alibaba-oss now returns every bucket of the account. Before, it returned only the first page of the listing, which Object Storage Service limits to 100 buckets by default. It now asks for 1000 buckets per request, and sends requests until the listing ends.
The listObjects operation now sends ListObjectsV2 requests instead of ListObjects, as the consumer does. It needs the same oss:ListObjects permission. A custom OSSClient, or a test that mocks it, must now implement or mock listObjectsV2 for this operation. The body is the same List of Map, with the same keys.
Without maxKeys, the producer now asks for 999 objects per request. Before, it set no page size, so the service sent its default of 100 objects. With maxKeys, each request asks for at most 999 objects, until the producer has maxKeys objects or the listing ends. Before, it sent maxKeys as the page size of every request, and the service rejected a value above 1000. Returning 1000 objects now takes two requests. When more objects match, listObjects now also sets the new CamelAlibabaOssNextContinuationToken header.
camel-xmlsecurity - non-GCM data ciphers rejected when GCM is configured
When XMLSecurityDataFormat is configured with an AES-GCM xmlCipherAlgorithm (including the default AES_256_GCM), unmarshal() now rejects incoming XML payloads encrypted with non-GCM data ciphers (such as AES-CBC or 3DES). Previously, unmarshal() accepted any data cipher declared in the incoming EncryptedData element regardless of the configured xmlCipherAlgorithm.
Routes that intentionally decrypt non-GCM payloads must explicitly configure a non-GCM xmlCipherAlgorithm (for example AES_128 or AES_256) on the receiving XMLSecurityDataFormat.
camel-seda - a non-empty queue is retained when its last producer stops
When all producers of a SEDA endpoint stop, the endpoint’s queue reference is now kept as long as it still holds messages — it is only removed when the queue is empty. Previously, the queue reference was always removed on the last producer stop, so a consumer that started afterwards received a fresh empty queue and lost the buffered messages. The empty-queue case is unaffected: a queue that holds no messages when its last producer stops is still removed as before.
A retained queue is released once a consumer has drained it and its endpoint shuts down, or when the SEDA component (or the CamelContext) itself stops. While the queue holds undelivered messages, any attempt to create a new SEDA endpoint for the same key with different queue parameters (for example a different size or multipleConsumers setting) will raise an IllegalArgumentException ("Cannot use existing queue …") when its producer or consumer starts, the same error that was already raised when the endpoint was still active. Before this change, the released queue was silently replaced with a fresh one, which caused the buffered messages to be discarded.
camel-seda - size and concurrentConsumers sentinel values are now respected
Two sentinel-value ambiguities in the SEDA component are fixed:
-
size=1000(the SEDA default) orsize=2147483647(Integer.MAX_VALUE) explicitly set on an endpoint URI are now recognised as a user choice and respected. Previously these values were treated as "not set" and silently replaced by the component default. With this fix, an explicitsize=1000creates a queue of capacity 1000, and an explicitsize=2147483647creates an unbounded queue, regardless of the component’s default queue size. An endpoint that specifies asizethat conflicts with the already-created queue of the same name now fails withIllegalArgumentException("Cannot use existing queue … does not match"). Previously the conflictingsizewas silently ignored and the existing queue was reused as-is. -
concurrentConsumers=1together withvirtualThreadPerTask=trueis now preserved. Previously the value 1 was always reset to 0 (no limit). An endpoint with?virtualThreadPerTask=true&concurrentConsumers=1now processes at most one message at a time, where it previously had no limit. WhenconcurrentConsumersis not set at all andvirtualThreadPerTask=true, the behaviour is unchanged: the default of 1 is still changed to 0 (no limit).
camel-test-citrus - missing binary validation module now fails instead of silently falling back
When a citrus:validate/…?messageType=BINARY (or BINARY_BASE64, GZIP_BASE64) endpoint cannot find a Citrus message validator and no other validator matches, validation now fails with a CitrusRuntimeException naming the type and listing the modules to add (for example citrus-validation-binary for binary and binary_base64, or citrus-validation-text for gzip_base64 and for the plaintext type).
Previously, MessageValidatorRegistry.findMessageValidators silently fell back to DefaultTextEqualsMessageValidator when no type-specific validator was registered, so a missing binary validation module caused plain-text body comparison (which always fails for byte payloads, but without a meaningful error message).
For text message types (json, xml, yaml, plaintext), MessageValidatorRegistry still retries with the XML, JSON and finally PLAINTEXT fallback validators before it declares a validator missing, so a text body with messageType=JSON and no citrus-validation-json on the classpath continues to be compared as plain text when citrus-validation-text is present. Add the required validation module to get type-specific validation. This also affects header-only validation specs, whose type is auto-detected as plaintext; these now require citrus-validation-text to be on the classpath to avoid falling back silently.
Note: the gzip message type (without base64 encoding) has been removed from the documented types. Use gzip_base64 instead (requires citrus-validation-text).
camel-aws2-cw - putMetricData rejects more than 1000 metric data items before the call
A putMetricData body with more than 1000 MetricDatum items now fails the exchange with an IllegalArgumentException before any request is sent. Before, the request was sent and CloudWatch rejected it with a CloudWatchException. A route that handled that exception type for this case must now handle the IllegalArgumentException instead.
camel-aws2-translate - a String CamelAwsTranslateTerminologyNames header is used, and other types fail
The CamelAwsTranslateTerminologyNames header can now be a String with one terminology name or names separated by commas, as well as a String[] or a Collection of names. Before, a String header was ignored, and the text was translated without a custom terminology. A route that sets this header as a String now sends the names to Amazon Translate, so a name that does not exist now fails the request with a ResourceNotFoundException from AWS.
A header of another type, such as an Integer, now fails the exchange with an IllegalArgumentException instead of being ignored.
camel-aws2-ses - the producer health check reports DOWN on an AWS service error
The producer health check of aws2-ses now reports DOWN when the GetSendStatistics probe fails with an AWS service error, such as throttling, an AccessDenied error or rejected credentials. Before, that branch fell through and the check reported UP, so a least-privilege policy that grants only ses:SendEmail and ses:SendRawEmail showed a healthy producer. A deployment with such a policy that has the producer health check enabled now sees DOWN after upgrading. Either grant ses:GetSendStatistics as well, or disable the check with the component option camel.component.aws2-ses.healthCheckProducerEnabled=false.
camel-robotframework - obsolete options suppressed, variables passthrough fixed
Five endpoint options that were forwarded to Robot Framework but no longer exist in Robot Framework 4.1.2 (the version bundled with this component) now no longer cause the run to fail with return code 252. Setting them is now a silent no-op:
-
runMode(removed in Robot Framework 2.8; usedryrun,exitOnFailure,skipTeardownOnExitandrandomizeinstead) -
splitOutputs(removed in Robot Framework 3.0) -
summaryTitle(removed in Robot Framework 3.0) -
monitorWidth(removed in Robot Framework 3.0) -
warnOnSkippedFiles(removed in Robot Framework 3.0)
The monitorColors option, which previously caused the run to fail because it was sent as the removed --monitorcolors flag, is now forwarded as --consolecolors. Valid values are auto (the default), on, ansi, and off.
The variables option previously declared in the endpoint URI was not passed to Robot Framework. It is now forwarded as --variable arguments. Variables set by the exchange message (body, headers, or exchange variables) are added after the endpoint variables and take precedence over them when a variable name collides.
camel-robotframework - console output is off by default
Robot Framework runs in the JVM of the application and writes its progress and summary to the console. That console stream is shared by the whole JVM and, once a run is interrupted (for example when a route is stopped during a run), it stays unusable, so every later run fails with IOError: java.nio.channels.ClosedChannelException.
The component only uses the return code and the output files of a run, so it now passes --console none to Robot Framework by default and the progress and the Output:, Log: and Report: lines are no longer written to the console. The new console endpoint option (verbose, dotted, quiet or none) restores the previous output: set console=verbose. The monitorColors option has an effect only when console is not none.
camel-mina - disconnectOnNoReply is used by the consumer
The camel-mina section of the 4.24 upgrade guide says that disconnectOnNoReply no longer has an effect. This only applies to the producer, which always closes its session when a request times out. A synchronous consumer uses the option: with disconnectOnNoReply=false it keeps the session open when the route ends with no body.
camel-debezium-mysql, camel-debezium-sqlserver, camel-debezium-oracle and camel-debezium-db2 - the file schema history is the default
The default of schemaHistoryInternal is now io.debezium.storage.file.history.FileSchemaHistory, so it is kept in a file like the default offsetStorage, and the examples in the documentation of these components already rely on it. Before, the default was io.debezium.storage.kafka.history.KafkaSchemaHistory: camel-debezium-mysql and camel-debezium-sqlserver set the file history under the old Debezium 1.x key database.history, which Debezium no longer reads, and camel-debezium-oracle and camel-debezium-db2 did not set it at all.
With the file schema history, schemaHistoryInternalFileFilename is required: a consumer without it now fails when the endpoint is created, with Required field 'schemaHistoryInternalFileFilename' must be set. Set it to the file the schema history is saved to, such as data/history-file-1.dat. To keep the Kafka schema history, set schemaHistoryInternal=io.debezium.storage.kafka.history.KafkaSchemaHistory explicitly, with its additionalProperties.schema.history.internal.kafka.* settings as before.
camel-infinispan - no longer depends on infinispan-query
camel-infinispan and camel-infinispan-common no longer depend on org.infinispan:infinispan-query. That artifact is the Infinispan embedded query engine, which Hot Rod clients don’t need: the query API that the component uses ships in infinispan-commons. Remote queries and continuous queries work as before.
As a result, applications that use camel-infinispan no longer get infinispan-query, infinispan-core, JGroups, Hibernate Search or Lucene on their classpath through it. If your application also starts an embedded cache manager or uses the embedded query engine, use camel-infinispan-embedded, or add these dependencies yourself.
camel-mina-sftp - readBufferSize, writeBufferSize and bulkRequests now take effect
The readBufferSize and writeBufferSize options of the mina-sftp component are now passed to the SftpClient.read() / SftpClient.write() calls and honoured on the wire. Before this fix, the configured values were stored but silently ignored by the transfer methods, which always used the MINA SSHD default buffer size.
Validation and capping rules apply:
-
The minimum accepted value is
256. Values in the range 1-255 are rejected with aGenericFileOperationFailedExceptionat connect time. Previously, such values were ignored and the MINA SSHD default was used. -
The maximum effective value is
129536bytes (~126.5 KB). Values above this limit are capped silently, as larger SFTP data frames can cause data corruption in Apache MINA SSHD (see SSHD-1069). -
A value of
0(or leaving the option unset) means the MINA SSHD default is used.
The deprecated bulkRequests option, which was already converted to buffer sizes internally, is now also subject to the same minimum and maximum rules.
camel-pubnub - CamelMessageTimestamp now holds milliseconds
The CamelMessageTimestamp header on PubNub message and presence events now holds the event time in milliseconds since the Unix epoch, matching the convention of other Camel components (JMS, Kafka, file, …).
In every earlier release the raw PubNub timetoken (a count of 100-nanosecond intervals since the epoch, a 17-digit number) was placed directly into CamelMessageTimestamp. The header value has changed: it is now timetoken / 10_000.
The raw timetoken is still available on the CamelPubNubTimeToken header.
camel-salesforce - REST and raw request URLs must stay on the configured instance
The REST client queryMore operation and the raw client makeRequest operation now validate the request URL they build before sending it. The nextRecordsUrl passed to queryMore and the path passed to makeRequest must be an absolute path (they have to begin with a single /), and the fully resolved URL must keep the scheme, host and port of the configured Salesforce instance URL. A value that does not meet these rules now fails fast with a SalesforceException instead of being sent. Legitimate nextRecordsUrl values returned by Salesforce and raw paths that begin with / are unaffected. In addition, the record id segment of the getSObject, updateSObject, updateSObjectMultipart, deleteSObject and getBlobField operations is now URL-encoded, matching the operations that already encode their path values.
camel-salesforce - pkChunking options now take effect
The endpoint options pkChunking, pkChunkingChunkSize, pkChunkingParent, and pkChunkingStartRow previously had no effect because they were not included in the value map read by the Bulk API processor. They are now forwarded as the Sforce-Enable-PKChunking request header when pkChunking=true is set.
If you rely on pkChunking* options being silently ignored — for example if you set them in an endpoint URI but intended jobs to run without chunking — remove those options or set pkChunking=false to restore the previous behaviour.
camel-snmp - SNMPv3 endpoints no longer use the SecurityModels of SNMP4J
The SNMPv3 producers and the POLL consumer now use a USM of their own, which holds only the user of the endpoint, as the TRAP consumer already did. They no longer register a USM in the JVM-wide SecurityModels.getInstance() of SNMP4J when they start, and no longer remove it when they stop. A USM or users that the application adds to SecurityModels.getInstance() are not used by the Camel endpoints: configure the user on the endpoint with securityName, authenticationProtocol, authenticationPassphrase, privacyProtocol and privacyPassphrase. Several SNMPv3 endpoints with different users can now be used in the same application.
All SNMPv3 endpoints, the TRAP consumer included, now register the default security protocols of SNMP4J when they start, so the SHA-2 authentication protocols and the privacy protocols are available without registering them.
camel-spring-redis - SpringRedisIdempotentRepository.clear() deletes only the set of the repository
SpringRedisIdempotentRepository.clear() (also the clear JMX operation) now deletes only the Redis set named by repositoryName, which holds the keys of the repository. Before, it ran FLUSHDB, which deleted every key of the selected Redis database, including data that does not belong to the repository. The flushOnStartup option is unchanged: it still deletes all keys of the database when the repository starts.
camel-spring-jdbc - the connection of a Spring transaction is left to the transaction manager
Inside a Spring transaction, the spring-jdbc producer used the connection of the transaction, but with the default resetAutoCommit=true it committed after each statement and then closed the connection, so the work could no longer be rolled back and the transaction manager failed on the closed connection. With resetAutoCommit=false it also closed the connection when the exchange was done. The producer now leaves such a connection to the transaction manager, whatever the value of resetAutoCommit, and gives it back with DataSourceUtils.releaseConnection. Setting resetAutoCommit=false as a workaround is no longer needed.
org.apache.camel.component.jdbc.ConnectionStrategy has a new default method releaseConnection(Connection, DataSource), which the producer calls instead of Connection.close().
camel-mail - To default derived from username now only applied when no recipient is configured
When no explicit to, cc or bcc recipient is configured on a mail producer endpoint, the username option previously set the To recipient to username@host during option binding. This happened immediately when the username setter was called, which meant the check ran before all options were bound.
From this release the default is applied lazily at endpoint creation time, after all URI options have been resolved. The practical effect is:
-
The userinfo form
smtp://svc@myhost?bcc=list@xno longer acquires an unwantedTo: svc@myhostheader. The mail is sent to the bcc list only, as intended. -
Code that calls
configuration.setUsername(…)beforeconfiguration.setBcc(…)on a manually built configuration no longer picks up an unwanted To. The endpoint creation step is where the default is applied. -
A
usernameconfigured at the component level (viaMailComponent) no longer produces a bogususer@nulladdress when the host is not yet known.
The default To derived from the username is still applied for the common case: when no to, cc or bcc recipient is set at all, the endpoint derives To from username@host (or username as-is when it already contains an at sign) during endpoint creation.
If you relied on the implicit To being set alongside an explicit cc or bcc, add an explicit to option to the URI.
Note: a MailConfiguration set directly on an endpoint (via endpoint.setConfiguration(…)) does not receive the default To, since the lazy application runs only inside MailComponent.createEndpoint.
camel-duckdb - an insert of a list of maps fails when the rows have different keys
The insert operation of the duckdb producer took the columns from the keys of the first Map only. A key that only a later row had was dropped silently, and a later element that was not a Map failed with a ClassCastException. Now every element must be a Map, and a row whose keys differ from the keys of the first row fails with a DuckDbException that names the row. A route that inserts rows with different keys must give every row the same keys (with null for a missing value).
camel-resilience4j - the config option is used
The config option of the Resilience4j EIP configuration (and camel.resilience4j.config) refers to a io.github.resilience4j.circuitbreaker.CircuitBreakerConfig in the registry, but it was never read, so the circuit breaker used the resilience4j defaults instead. The referenced config is now used as the base configuration, and the other circuit breaker options that are set on the EIP are applied on top of it. This includes the record and ignore exceptions of the referenced config, which now also decide whether the fallback runs.
When recordExceptions or ignoreExceptions are also set on the EIP, they replace a custom record or ignore exception predicate (recordException(Predicate) or ignoreException(Predicate)) of the referenced config instead of combining with it. The exception classes of the referenced config (recordExceptions(…) and ignoreExceptions(…)) are kept.
The exceptions are also matched against the causes of the exception that the route threw, so a checked exception such as an IOException in the record or ignore list of the referenced config matches, as it does for the recordExceptions and ignoreExceptions options of the EIP.
When the circuitBreaker option is also set, that circuit breaker keeps its own configuration, and only the record and ignore exceptions of the config option decide whether the fallback runs.
A reference that is not in the registry now fails the route at startup, as the circuitBreaker option does.
camel-aws-secrets-manager and camel-aws-parameter-store
The environment variable names for the AWS profile-credentials provider, SQS notification, SQS queue URL, and endpoint override settings previously used the wrong CAMEL_AWS_VAULT_* prefix. The correct prefix is CAMEL_VAULT_AWS_*, consistent with all other AWS Vault environment variables.
The old names (CAMEL_AWS_VAULT_PROFILE_NAME, CAMEL_AWS_VAULT_SQS_QUEUE_URL, CAMEL_AWS_VAULT_USE_SQS_NOTIFICATION, CAMEL_AWS_VAULT_IS_OVERRIDE_ENDPOINT, CAMEL_AWS_VAULT_URI_ENDPOINT_OVERRIDE) are still accepted as a fallback but are deprecated. Update your environment to use the CAMEL_VAULT_AWS_* spellings.
camel-xml-io-dsl - legacy Spring XML <beans> and OSGi <blueprint> files removed
The XML DSL (camel-xml-io-dsl) no longer loads legacy Spring XML <beans> files and OSGi <blueprint> files, and no longer accepts Spring Beans XML (<beans xmlns="http://www.springframework.org/schema/beans">) or a <camelContext> of Spring XML or Blueprint XML inside a <camel> file (put the routes, rests and data formats directly inside <camel>). This support was deprecated in Camel 4.22, and was only available in Camel CLI (camel run) and Camel Main with camel-kamelet-main.
Loading such a file now fails with an error that explains how to migrate, instead of starting with the beans missing:
Legacy Spring XML <beans> and OSGi <blueprint> XML is not supported by the XML DSL (camel-xml-io-dsl). ...
To migrate:
-
Declare the beans with Camel’s own
<bean>elements in the<camel>file. Use#bean:nameto refer to another bean. For example, the Spring bean:<beans xmlns="http://www.springframework.org/schema/beans"> <bean id="greeter" class="com.acme.Greeter"> <constructor-arg index="0" value="Hello"/> <property name="message" ref="myMessage"/> </bean> </beans>becomes:
<bean name="greeter" type="com.acme.Greeter"> <constructors> <constructor index="0" value="Hello"/> </constructors> <properties> <property key="message" value="#bean:myMessage"/> </properties> </bean>The beans that were predefined for Spring XML (
CamelContextandMainConfiguration) are gone; a bean that needs theCamelContextcan implementCamelContextAware. -
To keep running Spring XML files with Spring, use
camel-spring-xml(or Camel Spring Boot). -
To convert the routes and beans of a legacy file to YAML or the XML DSL, use
camel transform routeof Camel CLI 4.22 (LTS), which still reads them. AI coding agents also do this conversion well, and with the Camel MCP server they can validate the result against the Camel catalog.
Route files in the Camel namespace of OSGi Blueprint (http://camel.apache.org/schema/blueprint) are no longer loaded either. Use the XML DSL namespace (http://camel.apache.org/schema/xml-io) or no namespace.
The springOrBlueprintBeans property of org.apache.camel.model.app.BeansDefinition is removed, and so is the org.apache.camel.spi.annotations.ExternalSchemaElement annotation that it used.
The configAdminPid and configAdminFileName parameters of the camel:run goal of camel-maven-plugin are removed. They were for OSGi Blueprint and had no effect.
The Camel CLI (camel-kamelet-main) no longer ships Spring Framework (spring-context and its dependencies), as it was only there for the Spring XML support. The Spring annotations for dependency injection (@Component, @Autowired, …) are still downloaded on demand. Routes or beans that use other Spring classes must add the dependency, such as camel.jbang.dependencies=org.springframework:spring-context:<version>.
camel-main - virtualThreadsEnabled and typeConverterStatisticsEnabled honor the disabled ENV and SYS sources
camel.main.virtualThreadsEnabled and camel.main.typeConverterStatisticsEnabled were read from the OS environment variables and the JVM system properties even when camel.main.autoConfigurationEnvironmentVariablesEnabled or camel.main.autoConfigurationSystemPropertiesEnabled was set to false, while every other option of Camel Main ignored them. Now these two options ignore a disabled source too: for example CAMEL_MAIN_VIRTUALTHREADSENABLED=true no longer turns on virtual threads when the OS environment variables are disabled. Set the option in application.properties instead, or enable the source again.
camel-sql and camel-sql-stored - usePlaceholder, maxRows, outputHeader and batch expressions
The usePlaceholder option of a sql endpoint now applies to the query in the URI and to the onConsume, onConsumeFailed and onConsumeBatchComplete queries. Before, these queries followed only the usePlaceholder option of the component, so usePlaceholder=false on the endpoint did not keep a in them. An endpoint with usePlaceholder=false now sends to the database as is: replace it with ? in such a query.
The sql consumer no longer resets template.maxRows when maxMessagesPerPoll is not set (0, the default), so template.maxRows now limits the rows of a poll. When maxMessagesPerPoll is set, it still takes precedence.
The sql producer no longer sets the header that outputHeader names to null when the query has no result (an update or batch=true); the header keeps its previous value, or stays absent. A SelectOne query without a row still sets it to null.
With outputType=StreamList, the sql producer now reads the generated keys when the CamelSqlRetrieveGeneratedKeys header is true, into the CamelSqlGeneratedKeyRows and CamelSqlGeneratedKeysRowCount headers.
With batch=true, the sql-stored producer now evaluates a simple expression of an IN parameter (such as ${body[num]}) with the batch item as the message body, as :#name already did. Before, ${body} referred to the whole message body, so every item got the same value.
camel-as2 - the sslContextParameters of the component are used
The sslContextParameters of the AS2 component, and the global SSL configuration with useGlobalSslContextParameters, were turned into an SSLContext only after the endpoint had created its connection. So they were never used: as2://client/send sent over plain http, and as2://server/listen and as2://receipt/receive listened without TLS. They are now used, so an endpoint of a component with sslContextParameters connects and listens with TLS. An sslContext or sslContextParameters set on the endpoint takes precedence.
camel-jpa - an unknown entityType fails the endpoint, and the polling consumer closes its EntityManager
The entity class in the path of a jpa endpoint (jpa:com.foo.MyEntity) must now be a class that Camel can load, or an alias from the aliases component option. Before, a class name that could not be loaded was ignored and the endpoint had no entityType, so the producer stored the message body without converting it and the consumer failed later with No queryType property configured. Creating the endpoint now fails with a ResolveEndpointFailedException caused by a ClassNotFoundException. Check for a misspelled class name, and for query parameters appended without a ? (such as jpa:com.foo.MyEntity&entityType=java.util.List), which end up in the class name.
entityType and persistenceUnit are no longer marked as required in the catalog: the producer works without an entity class (for example with a query), and persistenceUnit defaults to camel.
The polling consumer (pollEnrich, or receive of a ConsumerTemplate) now closes the EntityManager it creates when the polled exchange is done, instead of leaving it open. With pollEnrich this happens when the enriched exchange completes. With a ConsumerTemplate, call doneUoW(exchange) when you are done with the received exchange, as for any other polled endpoint.
camel-core - route reload removes the route configurations a file no longer declares
When the routes are reloaded (camel.main.routesReloadEnabled, or RoutesLoader.updateRoutes), the route configurations of a reloaded file are replaced by those the file declares now. A route configuration removed from the file, or the route configurations of a deleted file, are removed. Before, they stayed and the routes created after the reload still used them. The routes that keep running are not created again, so they keep the route configuration they were created with until their own file is reloaded (with the default removeAllRoutes=true all routes are created again).
Each route configuration now has the resource it was loaded from, also those of XML and Java files. The new method CamelContext.removeRouteConfigurationsFromResources(pattern) removes the route configurations of the resources whose location matches the pattern.
camel-as2 - server/listen - MIC of a message signed, then compressed, then encrypted
The Received-Content-MIC of the MDN for a message that was signed, then compressed, then encrypted is now computed over the signed part exactly as it was received, as it already was for a message that is only signed, signed and encrypted, or compressed, then signed, then encrypted. Previously the multipart/signed inside the compressed entity of an encrypted message was not found, and the MIC was computed over a re-serialisation of the parsed part, which the sender could not match when the part has folded headers or a base64 or quoted-printable body encoded with a different line length or escaping.
camel-core - routes added with addRouteDefinition get the route configurations
A route that is added with ModelCamelContext.addRouteDefinition or addRouteDefinitions, as a RouteDefinition that is not prepared yet, now gets the matching route configurations of the CamelContext, in the same way as a route from a RouteBuilder: the global route configurations, or the ones selected with its routeConfigurationId. Before, such a route got no route configuration at all, so for example the onException of a global route configuration did not apply to it. This includes a route that is updated from XML with the JMX operation updateRouteFromXml of ManagedRoute: the updated route gets the matching route configurations too (select them with routeConfigurationId in the XML when the route used named route configurations). An error handler set on the route itself still takes precedence over the one of a route configuration.
Routes from a RouteBuilder, the YAML and XML DSLs, route templates, Kamelets and Spring XML are prepared already, and are not affected.
camel-core - adviceWith no longer merges the route configurations into the route a second time
AdviceWith prepares the advised route again, and this merged the definitions of the route configurations into the route a second time. The advised route had each onException, intercept, interceptFrom and interceptSendToEndpoint of a route configuration twice, and an intercept or interceptSendToEndpoint of a route configuration ran more than once per step or call. They are now in the advised route once, and run once, as in the route without adviceWith. A test that expects the higher counts on the mock endpoints of such an intercept must be updated.
camel-core - global route configurations are replaced and removed
A global route configuration (one without an id) now stays global when route configurations are looked up by id (getRouteConfigurationDefinition). Before, the lookup gave it a generated id such as routesConfiguration1, so routes added later without a routeConfigurationId no longer got it. This also happened on every route reload of a file with a route configuration.
As a result, reloading a file with a global route configuration now replaces the old one, and removeRouteConfiguration of a global route configuration removes it. Before, the old copy stayed in the list under a generated id, and still applied to routes with routeConfigurationId="*" or a pattern. getRouteConfigurationDefinition of an id that does not exist returns null, and getRouteConfigurationDefinition(null) returns the first global route configuration.
camel-mongodb - consumer validation, writeConcern, findDistinct and the change stream token
-
A tailable consumer (the default
consumerType) now fails to start withouttailTrackIncreasingField, and withpersistentTailTracking=truebut nopersistentId. These checks ran before the consumer type was known, so they never applied: such a consumer started, and every new cursor read the whole capped collection again. A producer endpoint with theconsumerTypeoption is rejected, as other consumer options are. -
The
writeConcernoption no longer has a default value. When it is not set, the write concern of the client is used, such asw=majorityinconnectionUriStringor the write concern of aMongoClientfrom the registry. Previously the producer always replaced it withACKNOWLEDGED, except when it used a database or collection from a header. When it is set, it now also applies to the database and collection of theCamelMongoDbDatabaseandCamelMongoDbCollectionheaders. -
findDistinctreturns the values with their type, for example anIntegeror aDate, in aList<Object>. They are decoded with the codecs of the collection, as its documents are. Previously it read them asStringand failed with a BSON decoding error on a field that is not a string. -
When both
changeStreamTokenandchangeStreamTokenRepositoryare set, the change streams consumer resumes after the token stored in the repository, and useschangeStreamTokenonly until a token has been stored. PreviouslychangeStreamTokenalways won, so the consumer resumed from it after each restart. To start again fromchangeStreamToken, remove the stored token from the repository. -
The
usernameandpasswordof an endpoint withhostsare percent-encoded in the connection string, so characters such as@,:,/and%reach the server as they are. If you percent-encoded them yourself to work around this, for examplepassword=RAW(p%40ss)for the passwordp@ss, set the plain value now (password=RAW(p@ss)): an encoded value is encoded again and fails to authenticate.