From c339129e0e986faf5aed5ca3ffc64ff3a76da278 Mon Sep 17 00:00:00 2001 From: dhairya05 Date: Sat, 14 Nov 2026 23:55:17 +0530 Subject: [PATCH 1/3] camel-hazelcast: deprecate CamelHazelcastCacheType, which nothing sets or reads The header is documented for the multimap consumer, next to CamelHazelcastCacheName, as "The type of the cache - here multimap". It suggests the consumer tells the route what kind of cache the event came from, but nothing in the component sets it - the listener path sets four headers and this is not one of them: public static void setListenerHeaders(Exchange ex, String listenerType, String listenerAction, String cacheName) { ex.getIn().setHeader(HazelcastConstants.CACHE_NAME, cacheName); HazelcastComponentHelper.setListenerHeaders(ex, listenerType, listenerAction); } public static void setListenerHeaders(Exchange ex, String listenerType, String listenerAction) { ex.getIn().setHeader(HazelcastConstants.LISTENER_ACTION, listenerAction); ex.getIn().setHeader(HazelcastConstants.LISTENER_TYPE, listenerType); ex.getIn().setHeader(HazelcastConstants.LISTENER_TIME, new Date().getTime()); } and no producer reads it either, so setting it changes nothing. Deprecate it with a note saying what the listener does set. The kind of cache is already in the endpoint scheme, and the sort of listener in CamelHazelcastListenerType. --- .../apache/camel/catalog/components/hazelcast-multimap.json | 2 +- .../component/hazelcast/multimap/hazelcast-multimap.json | 2 +- .../apache/camel/component/hazelcast/HazelcastConstants.java | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/hazelcast-multimap.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/hazelcast-multimap.json index 993694f40b9d3..eb28273a9550b 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/hazelcast-multimap.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/hazelcast-multimap.json @@ -36,7 +36,7 @@ "CamelHazelcastListenerType": { "index": 2, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The map consumer", "constantName": "org.apache.camel.component.hazelcast.HazelcastConstants#LISTENER_TYPE" }, "CamelHazelcastListenerTime": { "index": 3, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "Long", "deprecated": false, "autowired": false, "secret": false, "description": "The time of the event in millis", "constantName": "org.apache.camel.component.hazelcast.HazelcastConstants#LISTENER_TIME" }, "CamelHazelcastCacheName": { "index": 4, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The name of the cache - e.g. foo", "constantName": "org.apache.camel.component.hazelcast.HazelcastConstants#CACHE_NAME" }, - "CamelHazelcastCacheType": { "index": 5, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The type of the cache - here multimap", "constantName": "org.apache.camel.component.hazelcast.HazelcastConstants#CACHE_TYPE" }, + "CamelHazelcastCacheType": { "index": 5, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": true, "deprecationNote": "Never set or read by the component: the multimap listener sets the cache name, listener type, listener action and listener time only", "autowired": false, "secret": false, "description": "The type of the cache - here multimap. Deprecation note: Never set or read by the component: the multimap listener sets the cache name, listener type, listener action and listener time only", "constantName": "org.apache.camel.component.hazelcast.HazelcastConstants#CACHE_TYPE" }, "CamelHazelcastOperationType": { "index": 6, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The operation to perform", "constantName": "org.apache.camel.component.hazelcast.HazelcastConstants#OPERATION" } }, "bodyTypes": { diff --git a/components/camel-hazelcast/src/generated/resources/META-INF/org/apache/camel/component/hazelcast/multimap/hazelcast-multimap.json b/components/camel-hazelcast/src/generated/resources/META-INF/org/apache/camel/component/hazelcast/multimap/hazelcast-multimap.json index 993694f40b9d3..eb28273a9550b 100644 --- a/components/camel-hazelcast/src/generated/resources/META-INF/org/apache/camel/component/hazelcast/multimap/hazelcast-multimap.json +++ b/components/camel-hazelcast/src/generated/resources/META-INF/org/apache/camel/component/hazelcast/multimap/hazelcast-multimap.json @@ -36,7 +36,7 @@ "CamelHazelcastListenerType": { "index": 2, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The map consumer", "constantName": "org.apache.camel.component.hazelcast.HazelcastConstants#LISTENER_TYPE" }, "CamelHazelcastListenerTime": { "index": 3, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "Long", "deprecated": false, "autowired": false, "secret": false, "description": "The time of the event in millis", "constantName": "org.apache.camel.component.hazelcast.HazelcastConstants#LISTENER_TIME" }, "CamelHazelcastCacheName": { "index": 4, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The name of the cache - e.g. foo", "constantName": "org.apache.camel.component.hazelcast.HazelcastConstants#CACHE_NAME" }, - "CamelHazelcastCacheType": { "index": 5, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The type of the cache - here multimap", "constantName": "org.apache.camel.component.hazelcast.HazelcastConstants#CACHE_TYPE" }, + "CamelHazelcastCacheType": { "index": 5, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": true, "deprecationNote": "Never set or read by the component: the multimap listener sets the cache name, listener type, listener action and listener time only", "autowired": false, "secret": false, "description": "The type of the cache - here multimap. Deprecation note: Never set or read by the component: the multimap listener sets the cache name, listener type, listener action and listener time only", "constantName": "org.apache.camel.component.hazelcast.HazelcastConstants#CACHE_TYPE" }, "CamelHazelcastOperationType": { "index": 6, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The operation to perform", "constantName": "org.apache.camel.component.hazelcast.HazelcastConstants#OPERATION" } }, "bodyTypes": { diff --git a/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/HazelcastConstants.java b/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/HazelcastConstants.java index 5c666b71c81a6..62b58ef1fc91f 100644 --- a/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/HazelcastConstants.java +++ b/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/HazelcastConstants.java @@ -101,7 +101,10 @@ public final class HazelcastConstants { @Metadata(label = "consumer", description = "The name of the cache - e.g. \"foo\"", javaType = "String", applicableFor = { SCHEME_MULTIMAP, SCHEME_REPLICATED_MAP, SCHEME_LIST, SCHEME_QUEUE, SCHEME_SET, SCHEME_MAP, SCHEME_TOPIC }) public static final String CACHE_NAME = "CamelHazelcastCacheName"; - @Metadata(description = "The type of the cache - here multimap", javaType = "String", applicableFor = SCHEME_MULTIMAP) + @Metadata(description = "The type of the cache - here multimap", javaType = "String", applicableFor = SCHEME_MULTIMAP, + deprecationNote = "Never set or read by the component: the multimap listener sets the cache name, listener type," + + " listener action and listener time only") + @Deprecated public static final String CACHE_TYPE = "CamelHazelcastCacheType"; // actions (PUT, DELETE, GET, GET_ALL, UPDATE, CLEAR) From d776c87148788df0578e7def1c5668f6f3eb3374 Mon Sep 17 00:00:00 2001 From: Guillaume Nodet Date: Sat, 14 Nov 2026 19:05:51 +0000 Subject: [PATCH 2/3] Regen --- .../dsl/HazelcastMultimapEndpointBuilderFactory.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/HazelcastMultimapEndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/HazelcastMultimapEndpointBuilderFactory.java index bc60c886ea680..3fa04ac66b388 100644 --- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/HazelcastMultimapEndpointBuilderFactory.java +++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/HazelcastMultimapEndpointBuilderFactory.java @@ -691,7 +691,9 @@ public String hazelcastCacheName() { return "CamelHazelcastCacheName"; } /** - * The type of the cache - here multimap. + * The type of the cache - here multimap. Deprecation note: Never set or + * read by the component: the multimap listener sets the cache name, + * listener type, listener action and listener time only. * * The option is a: {@code String} type. * @@ -699,6 +701,7 @@ public String hazelcastCacheName() { * * @return the name of the header {@code HazelcastCacheType}. */ + @Deprecated public String hazelcastCacheType() { return "CamelHazelcastCacheType"; } From 75f339ea3e5f470787827695c65eb93268c81057 Mon Sep 17 00:00:00 2001 From: dhairya05 Date: Sun, 15 Nov 2026 15:14:41 +0530 Subject: [PATCH 3/3] camel-hazelcast: drop the CamelHazelcastCacheType rows from two pages, add an upgrade note The hand-written consumer header tables of hazelcast-map and hazelcast-replicatedmap still listed the header as something their consumer sets. They do not: HazelcastComponentHelper.setListenerHeaders sets the cache name, the listener type, the listener action and the listener time, and nothing in the component sets or reads the cache type. Dropped both rows, in src/main/docs and in the catalog copies. Added a section to the 4.24 upgrade guide, as #29709 did for camel-influxdb2. Co-Authored-By: Claude Opus 5 --- .../catalog/docs/hazelcast-map-component.adoc | 2 -- .../hazelcast-replicatedmap-component.adoc | 2 -- .../main/docs/hazelcast-map-component.adoc | 2 -- .../hazelcast-replicatedmap-component.adoc | 2 -- .../pages/camel-4x-upgrade-guide-4_24.adoc | 25 +++++++++++++++++++ 5 files changed, 25 insertions(+), 8 deletions(-) diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/hazelcast-map-component.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/hazelcast-map-component.adoc index 2cc99093e4fa0..fcedde0b5cfe4 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/hazelcast-map-component.adoc +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/hazelcast-map-component.adoc @@ -364,8 +364,6 @@ Header Variables inside the response message: |`CamelHazelcastObjectId` |`String` |the oid of the object |`CamelHazelcastCacheName` |`String` |the name of the cache (e.g., "foo") - -|`CamelHazelcastCacheType` |`String` |the type of the cache (e.g., map) |======================================================================= The object value will be stored within *added* and *updated* events inside diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/hazelcast-replicatedmap-component.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/hazelcast-replicatedmap-component.adoc index 58c6577ffd3c4..68e82608adf83 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/hazelcast-replicatedmap-component.adoc +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/hazelcast-replicatedmap-component.adoc @@ -224,8 +224,6 @@ Header Variables inside the response message: |`CamelHazelcastObjectId` |`String` | the oid of the object |`CamelHazelcastCacheName` |`String` |the name of the cache (e.g., "foo") - -|`CamelHazelcastCacheType` |`String` |the type of the cache (e.g., replicatedmap) |======================================================================= diff --git a/components/camel-hazelcast/src/main/docs/hazelcast-map-component.adoc b/components/camel-hazelcast/src/main/docs/hazelcast-map-component.adoc index 2cc99093e4fa0..fcedde0b5cfe4 100644 --- a/components/camel-hazelcast/src/main/docs/hazelcast-map-component.adoc +++ b/components/camel-hazelcast/src/main/docs/hazelcast-map-component.adoc @@ -364,8 +364,6 @@ Header Variables inside the response message: |`CamelHazelcastObjectId` |`String` |the oid of the object |`CamelHazelcastCacheName` |`String` |the name of the cache (e.g., "foo") - -|`CamelHazelcastCacheType` |`String` |the type of the cache (e.g., map) |======================================================================= The object value will be stored within *added* and *updated* events inside diff --git a/components/camel-hazelcast/src/main/docs/hazelcast-replicatedmap-component.adoc b/components/camel-hazelcast/src/main/docs/hazelcast-replicatedmap-component.adoc index 58c6577ffd3c4..68e82608adf83 100644 --- a/components/camel-hazelcast/src/main/docs/hazelcast-replicatedmap-component.adoc +++ b/components/camel-hazelcast/src/main/docs/hazelcast-replicatedmap-component.adoc @@ -224,8 +224,6 @@ Header Variables inside the response message: |`CamelHazelcastObjectId` |`String` | the oid of the object |`CamelHazelcastCacheName` |`String` |the name of the cache (e.g., "foo") - -|`CamelHazelcastCacheType` |`String` |the type of the cache (e.g., replicatedmap) |======================================================================= diff --git a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc index 028422a474ff9..b237dd7325025 100644 --- a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc +++ b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc @@ -8743,3 +8743,28 @@ if it configured the proxy. It is now deprecated, with a `deprecationNote` that says so, and its description no longer claims to configure a proxy. Remove `protocol` from the endpoint URI or the configuration. To send the client's traffic through a proxy, use `proxyProtocol` together with `proxyHost` and `proxyPort`, which the shared client builder does apply. + +=== camel-hazelcast - the CamelHazelcastCacheType header is deprecated + +The `CamelHazelcastCacheType` header is neither set nor read by the component. It was documented for +`hazelcast-multimap` only, and the multimap listener sets the cache name, the listener type, the listener action and +the listener time, never the cache type: + +[source,java] +---- +public static void setListenerHeaders(Exchange ex, String listenerType, String listenerAction, String cacheName) { + ex.getIn().setHeader(HazelcastConstants.CACHE_NAME, cacheName); + HazelcastComponentHelper.setListenerHeaders(ex, listenerType, listenerAction); +} + +public static void setListenerHeaders(Exchange ex, String listenerType, String listenerAction) { + ex.getIn().setHeader(HazelcastConstants.LISTENER_ACTION, listenerAction); + ex.getIn().setHeader(HazelcastConstants.LISTENER_TYPE, listenerType); + ex.getIn().setHeader(HazelcastConstants.LISTENER_TIME, new Date().getTime()); +} +---- + +A route reading it gets `null`. It is now deprecated, with a `deprecationNote` that says so, and the rows for it were +dropped from the consumer header tables of the `hazelcast-map` and `hazelcast-replicatedmap` pages, which also claimed +their consumer sets it. Nothing replaces it: the cache the event came from is named by `CamelHazelcastCacheName`, and a +route that needs to know which kind of cache that is can take it from the endpoint it consumes from.