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 47cd34f51f4d camel-influxdb2: deprecate retentionPolicy, which has no 
effect (#29709)
47cd34f51f4d is described below

commit 47cd34f51f4dc5651fa43dd9cd5a0fc8634ada9e
Author: dhairya05 <[email protected]>
AuthorDate: Thu Nov 12 23:39:18 2026 +0530

    camel-influxdb2: deprecate retentionPolicy, which has no effect (#29709)
---
 .../org/apache/camel/catalog/components/influxdb2.json      |  4 ++--
 .../org/apache/camel/component/influxdb2/influxdb2.json     |  4 ++--
 .../camel/component/influxdb2/InfluxDb2Constants.java       |  5 ++++-
 .../apache/camel/component/influxdb2/InfluxDb2Endpoint.java | 13 +++++++++++++
 .../modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc     | 11 +++++++++++
 .../endpoint/dsl/InfluxDb2EndpointBuilderFactory.java       |  8 +++++++-
 6 files changed, 39 insertions(+), 6 deletions(-)

diff --git 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/influxdb2.json
 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/influxdb2.json
index 4de5da996616..bb80477b0f95 100644
--- 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/influxdb2.json
+++ 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/influxdb2.json
@@ -30,7 +30,7 @@
   },
   "headers": {
     "CamelInfluxDB2MeasurementName": { "index": 0, "kind": "header", 
"displayName": "", "group": "producer", "label": "", "required": false, 
"javaType": "String", "deprecated": false, "autowired": false, "secret": false, 
"description": "The name of measurement", "constantName": 
"org.apache.camel.component.influxdb2.InfluxDb2Constants#MEASUREMENT" },
-    "camelInfluxDB.RetentionPolicy": { "index": 1, "kind": "header", 
"displayName": "", "group": "producer", "label": "", "required": false, 
"javaType": "String", "deprecated": false, "autowired": false, "secret": false, 
"description": "The string that defines the retention policy to the data 
created by the endpoint", "constantName": 
"org.apache.camel.component.influxdb2.InfluxDb2Constants#RETENTION_POLICY" },
+    "camelInfluxDB.RetentionPolicy": { "index": 1, "kind": "header", 
"displayName": "", "group": "producer", "label": "", "required": false, 
"javaType": "String", "deprecated": true, "deprecationNote": "Never read by the 
component: the InfluxDB 2.x write API has no retention policy, retention is a 
property of the bucket", "autowired": false, "secret": false, "description": 
"The string that defines the retention policy to the data created by the 
endpoint. Deprecation note: Never read by t [...]
     "CamelInfluxDB2WritePrecision": { "index": 2, "kind": "header", 
"displayName": "", "group": "producer", "label": "", "required": false, 
"javaType": "com.influxdb.client.domain.WritePrecision", "enum": [ "ms", "s", 
"us", "ns" ], "deprecated": false, "autowired": false, "secret": false, 
"description": "InfluxDb Write precision.", "constantName": 
"org.apache.camel.component.influxdb2.InfluxDb2Constants#WRITE_PRECISION" }
   },
   "bodyTypes": {
@@ -44,7 +44,7 @@
     "bucket": { "index": 3, "kind": "parameter", "displayName": "Bucket", 
"group": "producer", "label": "", "required": true, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": false, "description": "The name of the bucket where the time series 
will be stored." },
     "operation": { "index": 4, "kind": "parameter", "displayName": 
"Operation", "group": "producer", "label": "", "required": false, "type": 
"enum", "javaType": "org.apache.camel.component.influxdb2.enums.Operation", 
"enum": [ "INSERT", "PING" ], "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": "INSERT", "description": "Define if this 
operation is an insert or a ping." },
     "org": { "index": 5, "kind": "parameter", "displayName": "Org", "group": 
"producer", "label": "", "required": true, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "autowired": false, "secret": false, 
"description": "The name of the organization where the time series will be 
stored." },
-    "retentionPolicy": { "index": 6, "kind": "parameter", "displayName": 
"Retention Policy", "group": "producer", "label": "", "required": false, 
"type": "string", "javaType": "java.lang.String", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": "default", "description": 
"Define the retention policy to the data created by the endpoint." },
+    "retentionPolicy": { "index": 6, "kind": "parameter", "displayName": 
"Retention Policy", "group": "producer", "label": "", "required": false, 
"type": "string", "javaType": "java.lang.String", "deprecated": true, 
"deprecationNote": "Never read by the component: the InfluxDB 2.x write API has 
no retention policy, retention is a property of the bucket", "autowired": 
false, "secret": false, "defaultValue": "default", "description": "Define the 
retention policy to the data created by the  [...]
     "writePrecision": { "index": 7, "kind": "parameter", "displayName": "Write 
Precision", "group": "producer", "label": "", "required": false, "type": 
"enum", "javaType": "com.influxdb.client.domain.WritePrecision", "enum": [ 
"ms", "s", "us", "ns" ], "deprecated": false, "autowired": false, "secret": 
false, "defaultValue": "ms", "description": "The format or precision of time 
series timestamps." },
     "lazyStartProducer": { "index": 8, "kind": "parameter", "displayName": 
"Lazy Start Producer", "group": "producer (advanced)", "label": 
"producer,advanced", "required": false, "type": "boolean", "javaType": 
"boolean", "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": false, "description": "Whether the producer should be started 
lazy (on the first message). By starting lazy you can use this to allow 
CamelContext and routes to startup in situations where a produc [...]
   }
diff --git 
a/components/camel-influxdb2/src/generated/resources/META-INF/org/apache/camel/component/influxdb2/influxdb2.json
 
b/components/camel-influxdb2/src/generated/resources/META-INF/org/apache/camel/component/influxdb2/influxdb2.json
index 4de5da996616..bb80477b0f95 100644
--- 
a/components/camel-influxdb2/src/generated/resources/META-INF/org/apache/camel/component/influxdb2/influxdb2.json
+++ 
b/components/camel-influxdb2/src/generated/resources/META-INF/org/apache/camel/component/influxdb2/influxdb2.json
@@ -30,7 +30,7 @@
   },
   "headers": {
     "CamelInfluxDB2MeasurementName": { "index": 0, "kind": "header", 
"displayName": "", "group": "producer", "label": "", "required": false, 
"javaType": "String", "deprecated": false, "autowired": false, "secret": false, 
"description": "The name of measurement", "constantName": 
"org.apache.camel.component.influxdb2.InfluxDb2Constants#MEASUREMENT" },
-    "camelInfluxDB.RetentionPolicy": { "index": 1, "kind": "header", 
"displayName": "", "group": "producer", "label": "", "required": false, 
"javaType": "String", "deprecated": false, "autowired": false, "secret": false, 
"description": "The string that defines the retention policy to the data 
created by the endpoint", "constantName": 
"org.apache.camel.component.influxdb2.InfluxDb2Constants#RETENTION_POLICY" },
+    "camelInfluxDB.RetentionPolicy": { "index": 1, "kind": "header", 
"displayName": "", "group": "producer", "label": "", "required": false, 
"javaType": "String", "deprecated": true, "deprecationNote": "Never read by the 
component: the InfluxDB 2.x write API has no retention policy, retention is a 
property of the bucket", "autowired": false, "secret": false, "description": 
"The string that defines the retention policy to the data created by the 
endpoint. Deprecation note: Never read by t [...]
     "CamelInfluxDB2WritePrecision": { "index": 2, "kind": "header", 
"displayName": "", "group": "producer", "label": "", "required": false, 
"javaType": "com.influxdb.client.domain.WritePrecision", "enum": [ "ms", "s", 
"us", "ns" ], "deprecated": false, "autowired": false, "secret": false, 
"description": "InfluxDb Write precision.", "constantName": 
"org.apache.camel.component.influxdb2.InfluxDb2Constants#WRITE_PRECISION" }
   },
   "bodyTypes": {
@@ -44,7 +44,7 @@
     "bucket": { "index": 3, "kind": "parameter", "displayName": "Bucket", 
"group": "producer", "label": "", "required": true, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": false, "description": "The name of the bucket where the time series 
will be stored." },
     "operation": { "index": 4, "kind": "parameter", "displayName": 
"Operation", "group": "producer", "label": "", "required": false, "type": 
"enum", "javaType": "org.apache.camel.component.influxdb2.enums.Operation", 
"enum": [ "INSERT", "PING" ], "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": "INSERT", "description": "Define if this 
operation is an insert or a ping." },
     "org": { "index": 5, "kind": "parameter", "displayName": "Org", "group": 
"producer", "label": "", "required": true, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "autowired": false, "secret": false, 
"description": "The name of the organization where the time series will be 
stored." },
-    "retentionPolicy": { "index": 6, "kind": "parameter", "displayName": 
"Retention Policy", "group": "producer", "label": "", "required": false, 
"type": "string", "javaType": "java.lang.String", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": "default", "description": 
"Define the retention policy to the data created by the endpoint." },
+    "retentionPolicy": { "index": 6, "kind": "parameter", "displayName": 
"Retention Policy", "group": "producer", "label": "", "required": false, 
"type": "string", "javaType": "java.lang.String", "deprecated": true, 
"deprecationNote": "Never read by the component: the InfluxDB 2.x write API has 
no retention policy, retention is a property of the bucket", "autowired": 
false, "secret": false, "defaultValue": "default", "description": "Define the 
retention policy to the data created by the  [...]
     "writePrecision": { "index": 7, "kind": "parameter", "displayName": "Write 
Precision", "group": "producer", "label": "", "required": false, "type": 
"enum", "javaType": "com.influxdb.client.domain.WritePrecision", "enum": [ 
"ms", "s", "us", "ns" ], "deprecated": false, "autowired": false, "secret": 
false, "defaultValue": "ms", "description": "The format or precision of time 
series timestamps." },
     "lazyStartProducer": { "index": 8, "kind": "parameter", "displayName": 
"Lazy Start Producer", "group": "producer (advanced)", "label": 
"producer,advanced", "required": false, "type": "boolean", "javaType": 
"boolean", "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": false, "description": "Whether the producer should be started 
lazy (on the first message). By starting lazy you can use this to allow 
CamelContext and routes to startup in situations where a produc [...]
   }
diff --git 
a/components/camel-influxdb2/src/main/java/org/apache/camel/component/influxdb2/InfluxDb2Constants.java
 
b/components/camel-influxdb2/src/main/java/org/apache/camel/component/influxdb2/InfluxDb2Constants.java
index 10cd39aac4e1..858dc4fc2508 100644
--- 
a/components/camel-influxdb2/src/main/java/org/apache/camel/component/influxdb2/InfluxDb2Constants.java
+++ 
b/components/camel-influxdb2/src/main/java/org/apache/camel/component/influxdb2/InfluxDb2Constants.java
@@ -22,7 +22,10 @@ public final class InfluxDb2Constants {
     @Metadata(description = "The name of measurement", javaType = "String")
     public static final String MEASUREMENT = "CamelInfluxDB2MeasurementName";
     @Metadata(description = "The string that defines the retention policy to 
the data created by the endpoint",
-              javaType = "String")
+              javaType = "String",
+              deprecationNote = "Never read by the component: the InfluxDB 2.x 
write API has no retention policy,"
+                                + " retention is a property of the bucket")
+    @Deprecated
     public static final String RETENTION_POLICY = 
"camelInfluxDB.RetentionPolicy";
     public static final String ORG = "CamelInfluxDB2Org";
     public static final String BUCKET = "CamelInfluxDB2Bucket";
diff --git 
a/components/camel-influxdb2/src/main/java/org/apache/camel/component/influxdb2/InfluxDb2Endpoint.java
 
b/components/camel-influxdb2/src/main/java/org/apache/camel/component/influxdb2/InfluxDb2Endpoint.java
index 47898bdd55ef..e98bd5e2fd47 100644
--- 
a/components/camel-influxdb2/src/main/java/org/apache/camel/component/influxdb2/InfluxDb2Endpoint.java
+++ 
b/components/camel-influxdb2/src/main/java/org/apache/camel/component/influxdb2/InfluxDb2Endpoint.java
@@ -80,6 +80,9 @@ public class InfluxDb2Endpoint extends DefaultEndpoint {
     @Metadata(required = true, description = "The name of the bucket where the 
time series will be stored.")
     private String bucket;
     @UriParam(defaultValue = "default", description = "Define the retention 
policy to the data created by the endpoint.")
+    @Metadata(deprecationNote = "Never read by the component: the InfluxDB 2.x 
write API has no retention policy,"
+                                + " retention is a property of the bucket")
+    @Deprecated
     private String retentionPolicy = "default";
 
     @UriParam(defaultValue = "INSERT", description = "Define if this operation 
is an insert or a ping.")
@@ -134,10 +137,20 @@ public class InfluxDb2Endpoint extends DefaultEndpoint {
         this.bucket = bucket;
     }
 
+    /**
+     * @deprecated Never read by the component: the InfluxDB 2.x write API has 
no retention policy, retention is a
+     *             property of the bucket
+     */
+    @Deprecated
     public String getRetentionPolicy() {
         return retentionPolicy;
     }
 
+    /**
+     * @deprecated Never read by the component: the InfluxDB 2.x write API has 
no retention policy, retention is a
+     *             property of the bucket
+     */
+    @Deprecated
     public void setRetentionPolicy(String retentionPolicy) {
         this.retentionPolicy = retentionPolicy;
     }
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 03577d5cf348..93adc90a66f1 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
@@ -8252,3 +8252,14 @@ not pass a language on; a language header alone turns 
OCR on, unless the endpoin
 
 The language itself is passed to docling untouched, in both forms: it is 
docling's own identifier (language codes such
 as `en,de`, BCP-47 tags such as `iso:zh-Hant`, or `script/Latin`), and docling 
validates it.
+
+=== camel-influxdb2 - the retentionPolicy option and the 
camelInfluxDB.RetentionPolicy header are deprecated
+
+Neither has ever had any effect. A retention policy is an InfluxDB 1.x 
concept: its write API takes one per write, and
+`camel-influxdb` passes it there. The InfluxDB 2.x write API that this 
component calls does not -- retention is a
+property of the bucket -- so `InfluxDb2Producer` never reads the option or the 
header, and both were carried over from
+`camel-influxdb` along with the header's 1.x spelling, 
`camelInfluxDB.RetentionPolicy`.
+
+Both are now deprecated with a note that says so. Remove `retentionPolicy` 
from the endpoint URI and stop setting the
+header: they are silently ignored. To control how long the data is kept, set 
the retention period on the bucket the
+endpoint writes to.
diff --git 
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/InfluxDb2EndpointBuilderFactory.java
 
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/InfluxDb2EndpointBuilderFactory.java
index 3bd7ab725626..8ed601268714 100644
--- 
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/InfluxDb2EndpointBuilderFactory.java
+++ 
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/InfluxDb2EndpointBuilderFactory.java
@@ -172,6 +172,8 @@ public interface InfluxDb2EndpointBuilderFactory {
         }
         /**
          * Define the retention policy to the data created by the endpoint.
+         * Deprecation note: Never read by the component: the InfluxDB 2.x 
write
+         * API has no retention policy, retention is a property of the bucket.
          * 
          * The option is a: <code>java.lang.String</code> type.
          * 
@@ -181,6 +183,7 @@ public interface InfluxDb2EndpointBuilderFactory {
          * @param retentionPolicy the value to set
          * @return the dsl builder
          */
+        @Deprecated
         default InfluxDb2EndpointBuilder retentionPolicy(String 
retentionPolicy) {
             doSetProperty("retentionPolicy", retentionPolicy);
             return this;
@@ -359,7 +362,9 @@ public interface InfluxDb2EndpointBuilderFactory {
         }
         /**
          * The string that defines the retention policy to the data created by
-         * the endpoint.
+         * the endpoint. Deprecation note: Never read by the component: the
+         * InfluxDB 2.x write API has no retention policy, retention is a
+         * property of the bucket.
          * 
          * The option is a: {@code String} type.
          * 
@@ -367,6 +372,7 @@ public interface InfluxDb2EndpointBuilderFactory {
          * 
          * @return the name of the header {@code InfluxDB.RetentionPolicy}.
          */
+        @Deprecated
         public String influxdbRetentionpolicy() {
             return "camelInfluxDB.RetentionPolicy";
         }

Reply via email to