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/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/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/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/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) 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 bb1c272dca266..55e95ee9f0cb8 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 @@ -9343,6 +9343,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-docker - the loggingFilter and followRedirectFilter options are deprecated Neither option has had any effect since Camel 2.18, when the docker-java 3.x upgrade removed the 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"; }