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-spring-boot.git
The following commit(s) were added to refs/heads/main by this push:
new 9b4b7a9a888 [create-pull-request] automated change (#2130)
9b4b7a9a888 is described below
commit 9b4b7a9a888c66ee45342d9c5bf07b17897c304f
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Thu Nov 26 07:12:15 2026 +0100
[create-pull-request] automated change (#2130)
Co-authored-by: oscerd <[email protected]>
---
.../camel/springboot/catalog/components/kafka.json | 4 ++--
.../camel-kafka-starter/src/main/docs/kafka.json | 5 ++---
.../kafka/springboot/KafkaComponentConfiguration.java | 16 +++++++++++-----
docs/spring-boot/modules/ROOT/pages/starters/kafka.adoc | 2 +-
4 files changed, 16 insertions(+), 11 deletions(-)
diff --git
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/kafka.json
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/kafka.json
index a0019d302f8..739b510ec88 100644
---
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/kafka.json
+++
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/kafka.json
@@ -68,7 +68,7 @@
"maxPollIntervalMs": { "index": 41, "kind": "property", "displayName":
"Max Poll Interval Ms", "group": "consumer", "label": "consumer", "required":
false, "type": "duration", "javaType": "java.lang.Integer", "deprecated":
false, "autowired": false, "secret": false, "defaultValue": "300000",
"configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration",
"configurationField": "configuration", "description": "The maximum delay
between invocations of poll() when using cons [...]
"maxPollRecords": { "index": 42, "kind": "property", "displayName": "Max
Poll Records", "group": "consumer", "label": "consumer", "required": false,
"type": "integer", "javaType": "java.lang.Integer", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": 500, "configurationClass":
"org.apache.camel.component.kafka.KafkaConfiguration", "configurationField":
"configuration", "description": "The maximum number of records returned in a
single call to poll()" },
"offsetRepository": { "index": 43, "kind": "property", "displayName":
"Offset Repository", "group": "consumer", "label": "consumer", "required":
false, "type": "object", "javaType":
"org.apache.camel.spi.StateRepository<java.lang.String, java.lang.String>",
"deprecated": false, "autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.kafka.KafkaConfiguration", "configurationField":
"configuration", "description": "The offset repository to use to locally [...]
- "partitionAssignor": { "index": 44, "kind": "property", "displayName":
"Partition Assignor", "group": "consumer", "label": "consumer", "required":
false, "type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "defaultValue":
"org.apache.kafka.clients.consumer.RangeAssignor", "configurationClass":
"org.apache.camel.component.kafka.KafkaConfiguration", "configurationField":
"configuration", "description": "The class name of the parti [...]
+ "partitionAssignor": { "index": 44, "kind": "property", "displayName":
"Partition Assignor", "group": "consumer", "label": "consumer", "required":
false, "type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.kafka.KafkaConfiguration", "configurationField":
"configuration", "description": "The class names of the partition assignment
strategies, ordered by preference, that the client [...]
"pollOnError": { "index": 45, "kind": "property", "displayName": "Poll On
Error", "group": "consumer", "label": "consumer", "required": false, "type":
"enum", "javaType": "org.apache.camel.component.kafka.PollOnError", "enum": [
"DISCARD", "ERROR_HANDLER", "RECONNECT", "RETRY", "STOP" ], "deprecated":
false, "autowired": false, "secret": false, "defaultValue": "ERROR_HANDLER",
"configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration",
"configurationField": "configur [...]
"pollTimeoutMs": { "index": 46, "kind": "property", "displayName": "Poll
Timeout Ms", "group": "consumer", "label": "consumer", "required": false,
"type": "duration", "javaType": "java.lang.Long", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": "5000",
"configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration",
"configurationField": "configuration", "description": "The timeout used when
polling the KafkaConsumer." },
"preValidateHostAndPort": { "index": 47, "kind": "property",
"displayName": "Pre Validate Host And Port", "group": "consumer", "label":
"consumer", "required": false, "type": "boolean", "javaType": "boolean",
"deprecated": false, "autowired": false, "secret": false, "defaultValue": true,
"configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration",
"configurationField": "configuration", "description": "Whether to eager
validate that broker host:port is valid and can be [...]
@@ -228,7 +228,7 @@
"maxPollIntervalMs": { "index": 40, "kind": "parameter", "displayName":
"Max Poll Interval Ms", "group": "consumer", "label": "consumer", "required":
false, "type": "duration", "javaType": "java.lang.Integer", "deprecated":
false, "autowired": false, "secret": false, "defaultValue": "300000",
"configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration",
"configurationField": "configuration", "description": "The maximum delay
between invocations of poll() when using con [...]
"maxPollRecords": { "index": 41, "kind": "parameter", "displayName": "Max
Poll Records", "group": "consumer", "label": "consumer", "required": false,
"type": "integer", "javaType": "java.lang.Integer", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": 500, "configurationClass":
"org.apache.camel.component.kafka.KafkaConfiguration", "configurationField":
"configuration", "description": "The maximum number of records returned in a
single call to poll()" },
"offsetRepository": { "index": 42, "kind": "parameter", "displayName":
"Offset Repository", "group": "consumer", "label": "consumer", "required":
false, "type": "object", "javaType":
"org.apache.camel.spi.StateRepository<java.lang.String, java.lang.String>",
"deprecated": false, "autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.kafka.KafkaConfiguration", "configurationField":
"configuration", "description": "The offset repository to use to locally [...]
- "partitionAssignor": { "index": 43, "kind": "parameter", "displayName":
"Partition Assignor", "group": "consumer", "label": "consumer", "required":
false, "type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "defaultValue":
"org.apache.kafka.clients.consumer.RangeAssignor", "configurationClass":
"org.apache.camel.component.kafka.KafkaConfiguration", "configurationField":
"configuration", "description": "The class name of the part [...]
+ "partitionAssignor": { "index": 43, "kind": "parameter", "displayName":
"Partition Assignor", "group": "consumer", "label": "consumer", "required":
false, "type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.kafka.KafkaConfiguration", "configurationField":
"configuration", "description": "The class names of the partition assignment
strategies, ordered by preference, that the clien [...]
"pollOnError": { "index": 44, "kind": "parameter", "displayName": "Poll On
Error", "group": "consumer", "label": "consumer", "required": false, "type":
"enum", "javaType": "org.apache.camel.component.kafka.PollOnError", "enum": [
"DISCARD", "ERROR_HANDLER", "RECONNECT", "RETRY", "STOP" ], "deprecated":
false, "autowired": false, "secret": false, "defaultValue": "ERROR_HANDLER",
"configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration",
"configurationField": "configu [...]
"pollTimeoutMs": { "index": 45, "kind": "parameter", "displayName": "Poll
Timeout Ms", "group": "consumer", "label": "consumer", "required": false,
"type": "duration", "javaType": "java.lang.Long", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": "5000",
"configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration",
"configurationField": "configuration", "description": "The timeout used when
polling the KafkaConsumer." },
"preValidateHostAndPort": { "index": 46, "kind": "parameter",
"displayName": "Pre Validate Host And Port", "group": "consumer", "label":
"consumer", "required": false, "type": "boolean", "javaType": "boolean",
"deprecated": false, "autowired": false, "secret": false, "defaultValue": true,
"configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration",
"configurationField": "configuration", "description": "Whether to eager
validate that broker host:port is valid and can b [...]
diff --git a/components-starter/camel-kafka-starter/src/main/docs/kafka.json
b/components-starter/camel-kafka-starter/src/main/docs/kafka.json
index e48c48a91b1..5c83b21199f 100644
--- a/components-starter/camel-kafka-starter/src/main/docs/kafka.json
+++ b/components-starter/camel-kafka-starter/src/main/docs/kafka.json
@@ -485,9 +485,8 @@
{
"name": "camel.component.kafka.partition-assignor",
"type": "java.lang.String",
- "description": "The class name of the partition assignment strategy that
the client will use to distribute partition ownership amongst consumer
instances when group management is used",
- "sourceType":
"org.apache.camel.component.kafka.springboot.KafkaComponentConfiguration",
- "defaultValue": "org.apache.kafka.clients.consumer.RangeAssignor"
+ "description": "The class names of the partition assignment strategies,
ordered by preference, that the client will use to distribute partition
ownership amongst consumer instances when group management is used. Multiple
class names can be separated by comma. If not set, the Kafka default is used:
org.apache.kafka.clients.consumer.RangeAssignor and
org.apache.kafka.clients.consumer.CooperativeStickyAssignor. This uses the
RangeAssignor, but allows upgrading to the CooperativeSticky [...]
+ "sourceType":
"org.apache.camel.component.kafka.springboot.KafkaComponentConfiguration"
},
{
"name": "camel.component.kafka.partition-key",
diff --git
a/components-starter/camel-kafka-starter/src/main/java/org/apache/camel/component/kafka/springboot/KafkaComponentConfiguration.java
b/components-starter/camel-kafka-starter/src/main/java/org/apache/camel/component/kafka/springboot/KafkaComponentConfiguration.java
index 1a216114933..543e0524da9 100644
---
a/components-starter/camel-kafka-starter/src/main/java/org/apache/camel/component/kafka/springboot/KafkaComponentConfiguration.java
+++
b/components-starter/camel-kafka-starter/src/main/java/org/apache/camel/component/kafka/springboot/KafkaComponentConfiguration.java
@@ -397,11 +397,17 @@ public class KafkaComponentConfiguration
*/
private StateRepository<String, String> offsetRepository;
/**
- * The class name of the partition assignment strategy that the client will
- * use to distribute partition ownership amongst consumer instances when
- * group management is used
- */
- private String partitionAssignor =
"org.apache.kafka.clients.consumer.RangeAssignor";
+ * The class names of the partition assignment strategies, ordered by
+ * preference, that the client will use to distribute partition ownership
+ * amongst consumer instances when group management is used. Multiple class
+ * names can be separated by comma. If not set, the Kafka default is used:
+ * org.apache.kafka.clients.consumer.RangeAssignor and
+ * org.apache.kafka.clients.consumer.CooperativeStickyAssignor. This uses
+ * the RangeAssignor, but allows upgrading to the CooperativeStickyAssignor
+ * with a single rolling restart that removes the RangeAssignor from the
+ * list. This option is only used when groupProtocol is set to classic.
+ */
+ private String partitionAssignor;
/**
* What to do if kafka threw an exception while polling for new messages.
* Will by default use the value from the component configuration unless an
diff --git a/docs/spring-boot/modules/ROOT/pages/starters/kafka.adoc
b/docs/spring-boot/modules/ROOT/pages/starters/kafka.adoc
index 90eda3dc9c3..7aa6e42c294 100644
--- a/docs/spring-boot/modules/ROOT/pages/starters/kafka.adoc
+++ b/docs/spring-boot/modules/ROOT/pages/starters/kafka.adoc
@@ -98,7 +98,7 @@ The starter supports 140 options, which are listed below.
| camel.component.kafka.oauth-scope | OAuth scope. Used when saslAuthType is
set to OAUTH. | | String
| camel.component.kafka.oauth-token-endpoint-uri | OAuth token endpoint URI.
Used when saslAuthType is set to OAUTH. | | String
| camel.component.kafka.offset-repository | The offset repository to use to
locally store the offset of each partition of the topic. Defining one will
disable the autocommit. The option is a
org.apache.camel.spi.StateRepository<java.lang.String, java.lang.String> type.
| | String>
-| camel.component.kafka.partition-assignor | The class name of the partition
assignment strategy that the client will use to distribute partition ownership
amongst consumer instances when group management is used |
org.apache.kafka.clients.consumer.RangeAssignor | String
+| camel.component.kafka.partition-assignor | The class names of the partition
assignment strategies, ordered by preference, that the client will use to
distribute partition ownership amongst consumer instances when group management
is used. Multiple class names can be separated by comma. If not set, the Kafka
default is used: org.apache.kafka.clients.consumer.RangeAssignor and
org.apache.kafka.clients.consumer.CooperativeStickyAssignor. This uses the
RangeAssignor, but allows upgrading t [...]
| camel.component.kafka.partition-key | The partition to which the record will
be sent (or null if no partition was specified). If this option has been
configured then it take precedence over header KafkaConstants#PARTITION_KEY |
| Integer
| camel.component.kafka.partitioner | The partitioner class that determines
which partition to send a record to. If not set, the default partitioning logic
is used: a record with a key goes to a partition chosen by a hash of the key,
and a record without a key goes to a sticky partition that changes when at
least producerBatchSize bytes have been produced to it. A custom partitioner
implements the org.apache.kafka.clients.producer.Partitioner interface. | |
String
| camel.component.kafka.partitioner-ignore-keys | Whether the message keys
should be ignored when computing the partition. This setting has effect only
when partitioner is not set | false | Boolean