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 247a125fa814 CAMEL-23997: Deprecate queueBufferingMaxMessages option
in camel-kafka
247a125fa814 is described below
commit 247a125fa814350767027033e7bda0aa0631d09d
Author: Claus Ibsen <[email protected]>
AuthorDate: Wed Jul 15 09:09:22 2026 +0200
CAMEL-23997: Deprecate queueBufferingMaxMessages option in camel-kafka
Deprecate the queueBufferingMaxMessages option which has never been mapped
to any Kafka producer property and has no effect at runtime. Users should
use bufferMemorySize or maxBlockMs instead. Includes regenerated catalog
metadata, endpoint DSL, component DSL, and an upgrade guide entry.
Closes #24694
Co-Authored-By: Claude Opus 4.6 <[email protected]>
---
.../org/apache/camel/catalog/components/kafka.json | 4 ++--
.../META-INF/org/apache/camel/component/kafka/kafka.json | 4 ++--
.../apache/camel/component/kafka/KafkaConfiguration.java | 14 +++++++++++---
.../modules/ROOT/pages/camel-4x-upgrade-guide-4_22.adoc | 6 ++++++
.../component/dsl/KafkaComponentBuilderFactory.java | 6 +++---
.../builder/endpoint/dsl/KafkaEndpointBuilderFactory.java | 12 ++++++------
6 files changed, 30 insertions(+), 16 deletions(-)
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/kafka.json
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/kafka.json
index 866933be1afa..acfd1e2bbf26 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/kafka.json
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/kafka.json
@@ -98,7 +98,7 @@
"partitionerIgnoreKeys": { "index": 71, "kind": "property", "displayName":
"Partitioner Ignore Keys", "group": "producer", "label": "producer",
"required": false, "type": "boolean", "javaType": "boolean", "deprecated":
false, "autowired": false, "secret": false, "defaultValue": false,
"configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration",
"configurationField": "configuration", "description": "Whether the message keys
should be ignored when computing the partitio [...]
"partitionKey": { "index": 72, "kind": "property", "displayName":
"Partition Key", "group": "producer", "label": "producer", "required": false,
"type": "integer", "javaType": "java.lang.Integer", "deprecated": false,
"autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.kafka.KafkaConfiguration", "configurationField":
"configuration", "description": "The partition to which the record will be sent
(or null if no partition was specified). If this option [...]
"producerBatchSize": { "index": 73, "kind": "property", "displayName":
"Producer Batch Size", "group": "producer", "label": "producer", "required":
false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": 16384,
"configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration",
"configurationField": "configuration", "description": "The producer will
attempt to batch records together into fewer reque [...]
- "queueBufferingMaxMessages": { "index": 74, "kind": "property",
"displayName": "Queue Buffering Max Messages", "group": "producer", "label":
"producer", "required": false, "type": "integer", "javaType":
"java.lang.Integer", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": 10000, "configurationClass":
"org.apache.camel.component.kafka.KafkaConfiguration", "configurationField":
"configuration", "description": "The maximum number of unsent messages that can
be q [...]
+ "queueBufferingMaxMessages": { "index": 74, "kind": "property",
"displayName": "Queue Buffering Max Messages", "group": "producer", "label":
"producer", "required": false, "type": "integer", "javaType":
"java.lang.Integer", "deprecated": true, "autowired": false, "secret": false,
"defaultValue": 10000, "configurationClass":
"org.apache.camel.component.kafka.KafkaConfiguration", "configurationField":
"configuration", "description": "Deprecated: this option has no effect. Use
bufferMem [...]
"receiveBufferBytes": { "index": 75, "kind": "property", "displayName":
"Receive Buffer Bytes", "group": "producer", "label": "producer", "required":
false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": 65536,
"configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration",
"configurationField": "configuration", "description": "The size of the TCP
receive buffer (SO_RCVBUF) to use when reading [...]
"reconnectBackoffMs": { "index": 76, "kind": "property", "displayName":
"Reconnect Backoff Ms", "group": "producer", "label": "producer", "required":
false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": 50, "configurationClass":
"org.apache.camel.component.kafka.KafkaConfiguration", "configurationField":
"configuration", "description": "The amount of time to wait before attempting
to reconnect to a given [...]
"requestRequiredAcks": { "index": 77, "kind": "property", "displayName":
"Request Required Acks", "group": "producer", "label": "producer", "required":
false, "type": "enum", "javaType": "java.lang.String", "enum": [ "all", "-1",
"0", "1" ], "deprecated": false, "autowired": false, "secret": false,
"defaultValue": "all", "configurationClass":
"org.apache.camel.component.kafka.KafkaConfiguration", "configurationField":
"configuration", "description": "The number of acknowledgments the [...]
@@ -239,7 +239,7 @@
"partitionerIgnoreKeys": { "index": 66, "kind": "parameter",
"displayName": "Partitioner Ignore Keys", "group": "producer", "label":
"producer", "required": false, "type": "boolean", "javaType": "boolean",
"deprecated": false, "autowired": false, "secret": false, "defaultValue":
false, "configurationClass":
"org.apache.camel.component.kafka.KafkaConfiguration", "configurationField":
"configuration", "description": "Whether the message keys should be ignored
when computing the partiti [...]
"partitionKey": { "index": 67, "kind": "parameter", "displayName":
"Partition Key", "group": "producer", "label": "producer", "required": false,
"type": "integer", "javaType": "java.lang.Integer", "deprecated": false,
"autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.kafka.KafkaConfiguration", "configurationField":
"configuration", "description": "The partition to which the record will be sent
(or null if no partition was specified). If this optio [...]
"producerBatchSize": { "index": 68, "kind": "parameter", "displayName":
"Producer Batch Size", "group": "producer", "label": "producer", "required":
false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": 16384,
"configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration",
"configurationField": "configuration", "description": "The producer will
attempt to batch records together into fewer requ [...]
- "queueBufferingMaxMessages": { "index": 69, "kind": "parameter",
"displayName": "Queue Buffering Max Messages", "group": "producer", "label":
"producer", "required": false, "type": "integer", "javaType":
"java.lang.Integer", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": 10000, "configurationClass":
"org.apache.camel.component.kafka.KafkaConfiguration", "configurationField":
"configuration", "description": "The maximum number of unsent messages that can
be [...]
+ "queueBufferingMaxMessages": { "index": 69, "kind": "parameter",
"displayName": "Queue Buffering Max Messages", "group": "producer", "label":
"producer", "required": false, "type": "integer", "javaType":
"java.lang.Integer", "deprecated": true, "autowired": false, "secret": false,
"defaultValue": 10000, "configurationClass":
"org.apache.camel.component.kafka.KafkaConfiguration", "configurationField":
"configuration", "description": "Deprecated: this option has no effect. Use
bufferMe [...]
"receiveBufferBytes": { "index": 70, "kind": "parameter", "displayName":
"Receive Buffer Bytes", "group": "producer", "label": "producer", "required":
false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": 65536,
"configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration",
"configurationField": "configuration", "description": "The size of the TCP
receive buffer (SO_RCVBUF) to use when readin [...]
"reconnectBackoffMs": { "index": 71, "kind": "parameter", "displayName":
"Reconnect Backoff Ms", "group": "producer", "label": "producer", "required":
false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": 50, "configurationClass":
"org.apache.camel.component.kafka.KafkaConfiguration", "configurationField":
"configuration", "description": "The amount of time to wait before attempting
to reconnect to a given [...]
"requestRequiredAcks": { "index": 72, "kind": "parameter", "displayName":
"Request Required Acks", "group": "producer", "label": "producer", "required":
false, "type": "enum", "javaType": "java.lang.String", "enum": [ "all", "-1",
"0", "1" ], "deprecated": false, "autowired": false, "secret": false,
"defaultValue": "all", "configurationClass":
"org.apache.camel.component.kafka.KafkaConfiguration", "configurationField":
"configuration", "description": "The number of acknowledgments th [...]
diff --git
a/components/camel-kafka/src/generated/resources/META-INF/org/apache/camel/component/kafka/kafka.json
b/components/camel-kafka/src/generated/resources/META-INF/org/apache/camel/component/kafka/kafka.json
index 866933be1afa..acfd1e2bbf26 100644
---
a/components/camel-kafka/src/generated/resources/META-INF/org/apache/camel/component/kafka/kafka.json
+++
b/components/camel-kafka/src/generated/resources/META-INF/org/apache/camel/component/kafka/kafka.json
@@ -98,7 +98,7 @@
"partitionerIgnoreKeys": { "index": 71, "kind": "property", "displayName":
"Partitioner Ignore Keys", "group": "producer", "label": "producer",
"required": false, "type": "boolean", "javaType": "boolean", "deprecated":
false, "autowired": false, "secret": false, "defaultValue": false,
"configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration",
"configurationField": "configuration", "description": "Whether the message keys
should be ignored when computing the partitio [...]
"partitionKey": { "index": 72, "kind": "property", "displayName":
"Partition Key", "group": "producer", "label": "producer", "required": false,
"type": "integer", "javaType": "java.lang.Integer", "deprecated": false,
"autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.kafka.KafkaConfiguration", "configurationField":
"configuration", "description": "The partition to which the record will be sent
(or null if no partition was specified). If this option [...]
"producerBatchSize": { "index": 73, "kind": "property", "displayName":
"Producer Batch Size", "group": "producer", "label": "producer", "required":
false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": 16384,
"configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration",
"configurationField": "configuration", "description": "The producer will
attempt to batch records together into fewer reque [...]
- "queueBufferingMaxMessages": { "index": 74, "kind": "property",
"displayName": "Queue Buffering Max Messages", "group": "producer", "label":
"producer", "required": false, "type": "integer", "javaType":
"java.lang.Integer", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": 10000, "configurationClass":
"org.apache.camel.component.kafka.KafkaConfiguration", "configurationField":
"configuration", "description": "The maximum number of unsent messages that can
be q [...]
+ "queueBufferingMaxMessages": { "index": 74, "kind": "property",
"displayName": "Queue Buffering Max Messages", "group": "producer", "label":
"producer", "required": false, "type": "integer", "javaType":
"java.lang.Integer", "deprecated": true, "autowired": false, "secret": false,
"defaultValue": 10000, "configurationClass":
"org.apache.camel.component.kafka.KafkaConfiguration", "configurationField":
"configuration", "description": "Deprecated: this option has no effect. Use
bufferMem [...]
"receiveBufferBytes": { "index": 75, "kind": "property", "displayName":
"Receive Buffer Bytes", "group": "producer", "label": "producer", "required":
false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": 65536,
"configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration",
"configurationField": "configuration", "description": "The size of the TCP
receive buffer (SO_RCVBUF) to use when reading [...]
"reconnectBackoffMs": { "index": 76, "kind": "property", "displayName":
"Reconnect Backoff Ms", "group": "producer", "label": "producer", "required":
false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": 50, "configurationClass":
"org.apache.camel.component.kafka.KafkaConfiguration", "configurationField":
"configuration", "description": "The amount of time to wait before attempting
to reconnect to a given [...]
"requestRequiredAcks": { "index": 77, "kind": "property", "displayName":
"Request Required Acks", "group": "producer", "label": "producer", "required":
false, "type": "enum", "javaType": "java.lang.String", "enum": [ "all", "-1",
"0", "1" ], "deprecated": false, "autowired": false, "secret": false,
"defaultValue": "all", "configurationClass":
"org.apache.camel.component.kafka.KafkaConfiguration", "configurationField":
"configuration", "description": "The number of acknowledgments the [...]
@@ -239,7 +239,7 @@
"partitionerIgnoreKeys": { "index": 66, "kind": "parameter",
"displayName": "Partitioner Ignore Keys", "group": "producer", "label":
"producer", "required": false, "type": "boolean", "javaType": "boolean",
"deprecated": false, "autowired": false, "secret": false, "defaultValue":
false, "configurationClass":
"org.apache.camel.component.kafka.KafkaConfiguration", "configurationField":
"configuration", "description": "Whether the message keys should be ignored
when computing the partiti [...]
"partitionKey": { "index": 67, "kind": "parameter", "displayName":
"Partition Key", "group": "producer", "label": "producer", "required": false,
"type": "integer", "javaType": "java.lang.Integer", "deprecated": false,
"autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.kafka.KafkaConfiguration", "configurationField":
"configuration", "description": "The partition to which the record will be sent
(or null if no partition was specified). If this optio [...]
"producerBatchSize": { "index": 68, "kind": "parameter", "displayName":
"Producer Batch Size", "group": "producer", "label": "producer", "required":
false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": 16384,
"configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration",
"configurationField": "configuration", "description": "The producer will
attempt to batch records together into fewer requ [...]
- "queueBufferingMaxMessages": { "index": 69, "kind": "parameter",
"displayName": "Queue Buffering Max Messages", "group": "producer", "label":
"producer", "required": false, "type": "integer", "javaType":
"java.lang.Integer", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": 10000, "configurationClass":
"org.apache.camel.component.kafka.KafkaConfiguration", "configurationField":
"configuration", "description": "The maximum number of unsent messages that can
be [...]
+ "queueBufferingMaxMessages": { "index": 69, "kind": "parameter",
"displayName": "Queue Buffering Max Messages", "group": "producer", "label":
"producer", "required": false, "type": "integer", "javaType":
"java.lang.Integer", "deprecated": true, "autowired": false, "secret": false,
"defaultValue": 10000, "configurationClass":
"org.apache.camel.component.kafka.KafkaConfiguration", "configurationField":
"configuration", "description": "Deprecated: this option has no effect. Use
bufferMe [...]
"receiveBufferBytes": { "index": 70, "kind": "parameter", "displayName":
"Receive Buffer Bytes", "group": "producer", "label": "producer", "required":
false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": 65536,
"configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration",
"configurationField": "configuration", "description": "The size of the TCP
receive buffer (SO_RCVBUF) to use when readin [...]
"reconnectBackoffMs": { "index": 71, "kind": "parameter", "displayName":
"Reconnect Backoff Ms", "group": "producer", "label": "producer", "required":
false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": 50, "configurationClass":
"org.apache.camel.component.kafka.KafkaConfiguration", "configurationField":
"configuration", "description": "The amount of time to wait before attempting
to reconnect to a given [...]
"requestRequiredAcks": { "index": 72, "kind": "parameter", "displayName":
"Request Required Acks", "group": "producer", "label": "producer", "required":
false, "type": "enum", "javaType": "java.lang.String", "enum": [ "all", "-1",
"0", "1" ], "deprecated": false, "autowired": false, "secret": false,
"defaultValue": "all", "configurationClass":
"org.apache.camel.component.kafka.KafkaConfiguration", "configurationField":
"configuration", "description": "The number of acknowledgments th [...]
diff --git
a/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConfiguration.java
b/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConfiguration.java
index e074ec9e3ad9..2c0f57a671be 100755
---
a/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConfiguration.java
+++
b/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConfiguration.java
@@ -180,7 +180,9 @@ public class KafkaConfiguration implements Cloneable,
HeaderFilterStrategyAware
private Integer workerPoolMaxSize = 20;
// Async producer config
- @UriParam(label = "producer", defaultValue = "10000")
+ @Deprecated
+ @UriParam(label = "producer", defaultValue = "10000", description =
"Deprecated: this option has no effect."
+ + "
Use bufferMemorySize or maxBlockMs instead.")
private Integer queueBufferingMaxMessages = 10000;
@UriParam(label = "producer", defaultValue =
KafkaConstants.KAFKA_DEFAULT_SERIALIZER)
private String valueSerializer = KafkaConstants.KAFKA_DEFAULT_SERIALIZER;
@@ -1129,14 +1131,20 @@ public class KafkaConfiguration implements Cloneable,
HeaderFilterStrategyAware
this.deliveryTimeoutMs = deliveryTimeoutMs;
}
+ /**
+ * @deprecated This option has no effect since the old Scala Kafka
producer was removed (CAMEL-9467). Use
+ * {@link #setBufferMemorySize(Integer)} or {@link
#setMaxBlockMs(Integer)} instead.
+ */
+ @Deprecated
public Integer getQueueBufferingMaxMessages() {
return queueBufferingMaxMessages;
}
/**
- * The maximum number of unsent messages that can be queued up the
producer when using async mode before either the
- * producer must be blocked or data must be dropped.
+ * @deprecated This option has no effect since the old Scala Kafka
producer was removed (CAMEL-9467). Use
+ * {@link #setBufferMemorySize(Integer)} or {@link
#setMaxBlockMs(Integer)} instead.
*/
+ @Deprecated
public void setQueueBufferingMaxMessages(Integer
queueBufferingMaxMessages) {
this.queueBufferingMaxMessages = queueBufferingMaxMessages;
}
diff --git
a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_22.adoc
b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_22.adoc
index ab991634201e..64862ee17cf0 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_22.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_22.adoc
@@ -289,6 +289,12 @@ get a null record key even when `key=fixedKey` was
configured on the endpoint. A
list elements (not `Exchange` or `Message`) are now properly converted to the
configured serializer
type.
+=== camel-kafka - queueBufferingMaxMessages option deprecated
+
+The `queueBufferingMaxMessages` producer option has been deprecated. This
option has had no effect
+since the old Scala Kafka producer was removed in Camel 2.17 (CAMEL-9467). Use
`bufferMemorySize`
+or `maxBlockMs` instead.
+
=== camel-jbang catalog tables fill the terminal width
The `camel catalog` commands (`camel catalog component`, `camel catalog
dataformat`,
diff --git
a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/KafkaComponentBuilderFactory.java
b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/KafkaComponentBuilderFactory.java
index 96658395f739..6de8d52368be 100644
---
a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/KafkaComponentBuilderFactory.java
+++
b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/KafkaComponentBuilderFactory.java
@@ -1578,9 +1578,8 @@ public interface KafkaComponentBuilderFactory {
/**
- * The maximum number of unsent messages that can be queued up the
- * producer when using async mode before either the producer must be
- * blocked or data must be dropped.
+ * Deprecated: this option has no effect. Use bufferMemorySize or
+ * maxBlockMs instead.
*
* The option is a: <code>java.lang.Integer</code> type.
*
@@ -1590,6 +1589,7 @@ public interface KafkaComponentBuilderFactory {
* @param queueBufferingMaxMessages the value to set
* @return the dsl builder
*/
+ @Deprecated
default KafkaComponentBuilder
queueBufferingMaxMessages(java.lang.Integer queueBufferingMaxMessages) {
doSetProperty("queueBufferingMaxMessages",
queueBufferingMaxMessages);
return this;
diff --git
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/KafkaEndpointBuilderFactory.java
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/KafkaEndpointBuilderFactory.java
index fb9b6d809163..afa2f696f9f8 100644
---
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/KafkaEndpointBuilderFactory.java
+++
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/KafkaEndpointBuilderFactory.java
@@ -3390,9 +3390,8 @@ public interface KafkaEndpointBuilderFactory {
return this;
}
/**
- * The maximum number of unsent messages that can be queued up the
- * producer when using async mode before either the producer must be
- * blocked or data must be dropped.
+ * Deprecated: this option has no effect. Use bufferMemorySize or
+ * maxBlockMs instead.
*
* The option is a: <code>java.lang.Integer</code> type.
*
@@ -3402,14 +3401,14 @@ public interface KafkaEndpointBuilderFactory {
* @param queueBufferingMaxMessages the value to set
* @return the dsl builder
*/
+ @Deprecated
default KafkaEndpointProducerBuilder queueBufferingMaxMessages(Integer
queueBufferingMaxMessages) {
doSetProperty("queueBufferingMaxMessages",
queueBufferingMaxMessages);
return this;
}
/**
- * The maximum number of unsent messages that can be queued up the
- * producer when using async mode before either the producer must be
- * blocked or data must be dropped.
+ * Deprecated: this option has no effect. Use bufferMemorySize or
+ * maxBlockMs instead.
*
* The option will be converted to a <code>java.lang.Integer</code>
* type.
@@ -3420,6 +3419,7 @@ public interface KafkaEndpointBuilderFactory {
* @param queueBufferingMaxMessages the value to set
* @return the dsl builder
*/
+ @Deprecated
default KafkaEndpointProducerBuilder queueBufferingMaxMessages(String
queueBufferingMaxMessages) {
doSetProperty("queueBufferingMaxMessages",
queueBufferingMaxMessages);
return this;