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 568b13a6d807 camel-hazelcast: deprecate CamelHazelcastCacheType, which 
nothing sets or reads (#29959)
568b13a6d807 is described below

commit 568b13a6d80702a0fcb6d6d1e797a77e25690b33
Author: dhairya05 <[email protected]>
AuthorDate: Tue Nov 17 18:20:36 2026 +0530

    camel-hazelcast: deprecate CamelHazelcastCacheType, which nothing sets or 
reads (#29959)
    
    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.
    
    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 <[email protected]>
---
 .../catalog/components/hazelcast-multimap.json     |  2 +-
 .../catalog/docs/hazelcast-map-component.adoc      |  2 --
 .../docs/hazelcast-replicatedmap-component.adoc    |  2 --
 .../hazelcast/multimap/hazelcast-multimap.json     |  2 +-
 .../src/main/docs/hazelcast-map-component.adoc     |  2 --
 .../docs/hazelcast-replicatedmap-component.adoc    |  2 --
 .../component/hazelcast/HazelcastConstants.java    |  5 ++++-
 .../ROOT/pages/camel-4x-upgrade-guide-4_24.adoc    | 25 ++++++++++++++++++++++
 .../HazelcastMultimapEndpointBuilderFactory.java   |  5 ++++-
 9 files changed, 35 insertions(+), 12 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 993694f40b9d..eb28273a9550 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 lis [...]
     "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/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 2cc99093e4fa..fcedde0b5cfe 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 58c6577ffd3c..68e82608adf8 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/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 993694f40b9d..eb28273a9550 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 lis [...]
     "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/docs/hazelcast-map-component.adoc 
b/components/camel-hazelcast/src/main/docs/hazelcast-map-component.adoc
index 2cc99093e4fa..fcedde0b5cfe 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 58c6577ffd3c..68e82608adf8 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/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 5c666b71c81a..62b58ef1fc91 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)
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 c4ba07ebe963..72b68cd7d392 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
@@ -9683,6 +9683,31 @@ the permission with `CamelKeycloakPermissionId`
 
 Each is now deprecated, with a `deprecationNote` carrying the same information.
 
+=== 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.
+
 === camel-whatsapp - both documented headers are deprecated
 
 `CamelWhatsAppPhoneNumberId` and `CamelWhatsAppRecipientPhoneNumberId` were 
the only two headers the component
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 bc60c886ea68..3fa04ac66b38 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 interface HazelcastMultimapEndpointBuilderFactory {
             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 interface HazelcastMultimapEndpointBuilderFactory {
          * 
          * @return the name of the header {@code HazelcastCacheType}.
          */
+        @Deprecated
         public String hazelcastCacheType() {
             return "CamelHazelcastCacheType";
         }

Reply via email to