This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new d7770299c21f CAMEL-23689: Deprecate camel-headersmap
d7770299c21f is described below
commit d7770299c21f6f6470d5d98343bfc9a40ddc0eb4
Author: Guillaume Nodet <[email protected]>
AuthorDate: Fri Jun 5 09:03:31 2026 +0200
CAMEL-23689: Deprecate camel-headersmap
Since Camel 4.21, the default CaseInsensitiveMap in camel-core uses a
custom O(1) hash table with zero-allocation lookups and header key
deduplication, making the external cedarsoftware java-util dependency
unnecessary. Mark camel-headersmap as deprecated with @Deprecated on
FastHeadersMapFactory, (deprecated) suffix in pom.xml and docs, and
upgrade guide entry with migration guidance.
Closes #23774
---
.../org/apache/camel/catalog/others/headersmap.json | 2 +-
components/camel-headersmap/pom.xml | 2 +-
.../META-INF/services/org/apache/camel/other.properties | 2 +-
.../src/generated/resources/headersmap.json | 2 +-
components/camel-headersmap/src/main/docs/headersmap.adoc | 13 +++++++++++--
.../camel/component/headersmap/FastHeadersMapFactory.java | 4 ++++
.../modules/ROOT/pages/camel-4x-upgrade-guide-4_21.adoc | 7 +++++++
7 files changed, 26 insertions(+), 6 deletions(-)
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others/headersmap.json
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others/headersmap.json
index 498eb4bf1f2f..3cd9b09ac3fe 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others/headersmap.json
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others/headersmap.json
@@ -4,7 +4,7 @@
"name": "headersmap",
"title": "Headersmap",
"description": "Fast case-insensitive headers map implementation",
- "deprecated": false,
+ "deprecated": true,
"firstVersion": "2.20.0",
"label": "core",
"supportLevel": "Stable",
diff --git a/components/camel-headersmap/pom.xml
b/components/camel-headersmap/pom.xml
index 3446471bd206..900428ad8b86 100644
--- a/components/camel-headersmap/pom.xml
+++ b/components/camel-headersmap/pom.xml
@@ -28,7 +28,7 @@
<artifactId>camel-headersmap</artifactId>
<packaging>jar</packaging>
- <name>Camel :: Headers Map</name>
+ <name>Camel :: Headers Map (deprecated)</name>
<description>Fast case-insensitive headers map implementation</description>
<properties>
diff --git
a/components/camel-headersmap/src/generated/resources/META-INF/services/org/apache/camel/other.properties
b/components/camel-headersmap/src/generated/resources/META-INF/services/org/apache/camel/other.properties
index 97a9e20b821a..c0cc4622d086 100644
---
a/components/camel-headersmap/src/generated/resources/META-INF/services/org/apache/camel/other.properties
+++
b/components/camel-headersmap/src/generated/resources/META-INF/services/org/apache/camel/other.properties
@@ -3,5 +3,5 @@ name=headersmap
groupId=org.apache.camel
artifactId=camel-headersmap
version=4.21.0-SNAPSHOT
-projectName=Camel :: Headers Map
+projectName=Camel :: Headers Map (deprecated)
projectDescription=Fast case-insensitive headers map implementation
diff --git
a/components/camel-headersmap/src/generated/resources/headersmap.json
b/components/camel-headersmap/src/generated/resources/headersmap.json
index 498eb4bf1f2f..3cd9b09ac3fe 100644
--- a/components/camel-headersmap/src/generated/resources/headersmap.json
+++ b/components/camel-headersmap/src/generated/resources/headersmap.json
@@ -4,7 +4,7 @@
"name": "headersmap",
"title": "Headersmap",
"description": "Fast case-insensitive headers map implementation",
- "deprecated": false,
+ "deprecated": true,
"firstVersion": "2.20.0",
"label": "core",
"supportLevel": "Stable",
diff --git a/components/camel-headersmap/src/main/docs/headersmap.adoc
b/components/camel-headersmap/src/main/docs/headersmap.adoc
index cde1782070c1..3df7e2c11d2d 100644
--- a/components/camel-headersmap/src/main/docs/headersmap.adoc
+++ b/components/camel-headersmap/src/main/docs/headersmap.adoc
@@ -1,14 +1,23 @@
-= Headersmap Component
+= Headersmap Component (deprecated)
:doctitle: Headersmap
:shortname: headersmap
:artifactid: camel-headersmap
:description: Fast case-insensitive headers map implementation
:since: 2.20
-:supportlevel: Stable
+:supportlevel: Stable-deprecated
+:deprecated: *deprecated*
:tabs-sync-option:
*Since Camel {since}*
+[NOTE]
+====
+This component is deprecated. Since Camel 4.21, the default
`CaseInsensitiveMap` in camel-core
+uses a custom O(1) hash table with zero-allocation lookups, making this
component unnecessary.
+Simply remove the `camel-headersmap` dependency — the core implementation now
provides equivalent
+or better performance without any external library.
+====
+
The Headersmap component is a faster implementation of a case-insensitive map
which can be plugged in
and used by Camel at runtime to have slight faster performance in the Camel
Message headers.
diff --git
a/components/camel-headersmap/src/main/java/org/apache/camel/component/headersmap/FastHeadersMapFactory.java
b/components/camel-headersmap/src/main/java/org/apache/camel/component/headersmap/FastHeadersMapFactory.java
index dfd7fe1dfe17..789f4dadfd2d 100644
---
a/components/camel-headersmap/src/main/java/org/apache/camel/component/headersmap/FastHeadersMapFactory.java
+++
b/components/camel-headersmap/src/main/java/org/apache/camel/component/headersmap/FastHeadersMapFactory.java
@@ -25,7 +25,11 @@ import org.apache.camel.spi.annotations.JdkService;
/**
* A faster {@link HeadersMapFactory} which is using the {@link
com.cedarsoftware.util.CaseInsensitiveMap} map
* implementation.
+ *
+ * @deprecated use the default {@code DefaultHeadersMapFactory} from
camel-core which now provides O(1) hash-based
+ * lookups. This component will be removed in a future release.
*/
+@Deprecated
@JdkService(HeadersMapFactory.FACTORY)
public class FastHeadersMapFactory implements HeadersMapFactory {
diff --git
a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_21.adoc
b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_21.adoc
index 50d714498733..5dc446b2d84c 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_21.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_21.adoc
@@ -1761,6 +1761,13 @@
from("langchain4j-tools:test1?tags=user&description=Query user by number¶met
Additionally, `camel-langchain4j-agent` now extracts primitive values (`int`,
`long`, `double`, `boolean`,
`String`) from tool arguments instead of setting raw `JsonNode` objects as
headers.
+=== Deprecation of camel-headersmap
+
+The component camel-headersmap is deprecated. Since Camel 4.21, the default
`CaseInsensitiveMap` in camel-core
+uses a custom O(1) hash table with zero-allocation lookups and header key
deduplication, making the external
+cedarsoftware `java-util` dependency unnecessary. Simply remove the
`camel-headersmap` dependency from your
+project — the core implementation now provides equivalent or better
performance.
+
=== Deprecation of camel-paho
The components camel-paho is deprecated. There were no new release since 2020
of the Java client, last non-regulatory commit was in 2022.