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 3f7381b6eee CAMEL-21691: camel-kafka - Improve docs a bit
3f7381b6eee is described below

commit 3f7381b6eee4e4cd0cd6f962fc9a9dd016f99517
Author: Claus Ibsen <[email protected]>
AuthorDate: Mon Feb 3 09:59:37 2025 +0100

    CAMEL-21691: camel-kafka - Improve docs a bit
---
 .../resources/org/apache/camel/catalog/components/kafka.json |  4 ++--
 .../META-INF/org/apache/camel/component/kafka/kafka.json     |  4 ++--
 .../org/apache/camel/component/kafka/KafkaConfiguration.java | 10 ++++++++--
 .../builder/component/dsl/KafkaComponentBuilderFactory.java  |  6 +++++-
 .../builder/endpoint/dsl/KafkaEndpointBuilderFactory.java    | 12 ++++++++++--
 5 files changed, 27 insertions(+), 9 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 f425fe13671..379138fb1d8 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
@@ -37,7 +37,7 @@
     "autoCommitEnable": { "index": 10, "kind": "property", "displayName": 
"Auto Commit Enable", "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": "If true, periodically 
commit to ZooKeeper the offset of messages already fetched  [...]
     "autoCommitIntervalMs": { "index": 11, "kind": "property", "displayName": 
"Auto Commit Interval Ms", "group": "consumer", "label": "consumer", 
"required": false, "type": "integer", "javaType": "java.lang.Integer", 
"deprecated": false, "autowired": false, "secret": false, "defaultValue": 
"5000", "configurationClass": 
"org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": 
"configuration", "description": "The frequency in ms that the consumer offsets 
are committed  [...]
     "autoOffsetReset": { "index": 12, "kind": "property", "displayName": "Auto 
Offset Reset", "group": "consumer", "label": "consumer", "required": false, 
"type": "string", "javaType": "java.lang.String", "enum": [ "latest", 
"earliest", "none" ], "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": "latest", "configurationClass": 
"org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": 
"configuration", "description": "What to do when there is no i [...]
-    "batching": { "index": 13, "kind": "property", "displayName": "Batching", 
"group": "consumer", "label": "consumer", "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 to use batching for processing or 
streaming. The default is false, which uses streaming" },
+    "batching": { "index": 13, "kind": "property", "displayName": "Batching", 
"group": "consumer", "label": "consumer", "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 to use batching for processing or 
streaming. The default is false, which uses streaming. I [...]
     "breakOnFirstError": { "index": 14, "kind": "property", "displayName": 
"Break On First Error", "group": "consumer", "label": "consumer", "required": 
false, "type": "boolean", "javaType": "boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": false, 
"configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", 
"configurationField": "configuration", "description": "This options controls 
what happens when a consumer is processing an exchange  [...]
     "bridgeErrorHandler": { "index": 15, "kind": "property", "displayName": 
"Bridge Error Handler", "group": "consumer", "label": "consumer", "required": 
false, "type": "boolean", "javaType": "boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": false, "description": 
"Allows for bridging the consumer to the Camel routing Error Handler, which 
mean any exceptions (if possible) occurred while the Camel consumer is trying 
to pickup incoming messages, or the lik [...]
     "checkCrcs": { "index": 16, "kind": "property", "displayName": "Check 
Crcs", "group": "consumer", "label": "consumer", "required": false, "type": 
"boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": "true", "configurationClass": 
"org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": 
"configuration", "description": "Automatically check the CRC32 of the records 
consumed. This ensures no on-the-wire o [...]
@@ -170,7 +170,7 @@
     "autoCommitEnable": { "index": 10, "kind": "parameter", "displayName": 
"Auto Commit Enable", "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": "If true, periodically 
commit to ZooKeeper the offset of messages already fetched [...]
     "autoCommitIntervalMs": { "index": 11, "kind": "parameter", "displayName": 
"Auto Commit Interval Ms", "group": "consumer", "label": "consumer", 
"required": false, "type": "integer", "javaType": "java.lang.Integer", 
"deprecated": false, "autowired": false, "secret": false, "defaultValue": 
"5000", "configurationClass": 
"org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": 
"configuration", "description": "The frequency in ms that the consumer offsets 
are committed [...]
     "autoOffsetReset": { "index": 12, "kind": "parameter", "displayName": 
"Auto Offset Reset", "group": "consumer", "label": "consumer", "required": 
false, "type": "string", "javaType": "java.lang.String", "enum": [ "latest", 
"earliest", "none" ], "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": "latest", "configurationClass": 
"org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": 
"configuration", "description": "What to do when there is no  [...]
-    "batching": { "index": 13, "kind": "parameter", "displayName": "Batching", 
"group": "consumer", "label": "consumer", "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 to use batching for processing or 
streaming. The default is false, which uses streaming" },
+    "batching": { "index": 13, "kind": "parameter", "displayName": "Batching", 
"group": "consumer", "label": "consumer", "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 to use batching for processing or 
streaming. The default is false, which uses streaming.  [...]
     "breakOnFirstError": { "index": 14, "kind": "parameter", "displayName": 
"Break On First Error", "group": "consumer", "label": "consumer", "required": 
false, "type": "boolean", "javaType": "boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": false, 
"configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", 
"configurationField": "configuration", "description": "This options controls 
what happens when a consumer is processing an exchange [...]
     "checkCrcs": { "index": 15, "kind": "parameter", "displayName": "Check 
Crcs", "group": "consumer", "label": "consumer", "required": false, "type": 
"boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": "true", "configurationClass": 
"org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": 
"configuration", "description": "Automatically check the CRC32 of the records 
consumed. This ensures no on-the-wire  [...]
     "commitTimeoutMs": { "index": 16, "kind": "parameter", "displayName": 
"Commit 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 maximum time, in 
milliseconds, that the code will wait for a synchro [...]
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 f425fe13671..379138fb1d8 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
@@ -37,7 +37,7 @@
     "autoCommitEnable": { "index": 10, "kind": "property", "displayName": 
"Auto Commit Enable", "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": "If true, periodically 
commit to ZooKeeper the offset of messages already fetched  [...]
     "autoCommitIntervalMs": { "index": 11, "kind": "property", "displayName": 
"Auto Commit Interval Ms", "group": "consumer", "label": "consumer", 
"required": false, "type": "integer", "javaType": "java.lang.Integer", 
"deprecated": false, "autowired": false, "secret": false, "defaultValue": 
"5000", "configurationClass": 
"org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": 
"configuration", "description": "The frequency in ms that the consumer offsets 
are committed  [...]
     "autoOffsetReset": { "index": 12, "kind": "property", "displayName": "Auto 
Offset Reset", "group": "consumer", "label": "consumer", "required": false, 
"type": "string", "javaType": "java.lang.String", "enum": [ "latest", 
"earliest", "none" ], "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": "latest", "configurationClass": 
"org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": 
"configuration", "description": "What to do when there is no i [...]
-    "batching": { "index": 13, "kind": "property", "displayName": "Batching", 
"group": "consumer", "label": "consumer", "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 to use batching for processing or 
streaming. The default is false, which uses streaming" },
+    "batching": { "index": 13, "kind": "property", "displayName": "Batching", 
"group": "consumer", "label": "consumer", "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 to use batching for processing or 
streaming. The default is false, which uses streaming. I [...]
     "breakOnFirstError": { "index": 14, "kind": "property", "displayName": 
"Break On First Error", "group": "consumer", "label": "consumer", "required": 
false, "type": "boolean", "javaType": "boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": false, 
"configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", 
"configurationField": "configuration", "description": "This options controls 
what happens when a consumer is processing an exchange  [...]
     "bridgeErrorHandler": { "index": 15, "kind": "property", "displayName": 
"Bridge Error Handler", "group": "consumer", "label": "consumer", "required": 
false, "type": "boolean", "javaType": "boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": false, "description": 
"Allows for bridging the consumer to the Camel routing Error Handler, which 
mean any exceptions (if possible) occurred while the Camel consumer is trying 
to pickup incoming messages, or the lik [...]
     "checkCrcs": { "index": 16, "kind": "property", "displayName": "Check 
Crcs", "group": "consumer", "label": "consumer", "required": false, "type": 
"boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": "true", "configurationClass": 
"org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": 
"configuration", "description": "Automatically check the CRC32 of the records 
consumed. This ensures no on-the-wire o [...]
@@ -170,7 +170,7 @@
     "autoCommitEnable": { "index": 10, "kind": "parameter", "displayName": 
"Auto Commit Enable", "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": "If true, periodically 
commit to ZooKeeper the offset of messages already fetched [...]
     "autoCommitIntervalMs": { "index": 11, "kind": "parameter", "displayName": 
"Auto Commit Interval Ms", "group": "consumer", "label": "consumer", 
"required": false, "type": "integer", "javaType": "java.lang.Integer", 
"deprecated": false, "autowired": false, "secret": false, "defaultValue": 
"5000", "configurationClass": 
"org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": 
"configuration", "description": "The frequency in ms that the consumer offsets 
are committed [...]
     "autoOffsetReset": { "index": 12, "kind": "parameter", "displayName": 
"Auto Offset Reset", "group": "consumer", "label": "consumer", "required": 
false, "type": "string", "javaType": "java.lang.String", "enum": [ "latest", 
"earliest", "none" ], "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": "latest", "configurationClass": 
"org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": 
"configuration", "description": "What to do when there is no  [...]
-    "batching": { "index": 13, "kind": "parameter", "displayName": "Batching", 
"group": "consumer", "label": "consumer", "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 to use batching for processing or 
streaming. The default is false, which uses streaming" },
+    "batching": { "index": 13, "kind": "parameter", "displayName": "Batching", 
"group": "consumer", "label": "consumer", "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 to use batching for processing or 
streaming. The default is false, which uses streaming.  [...]
     "breakOnFirstError": { "index": 14, "kind": "parameter", "displayName": 
"Break On First Error", "group": "consumer", "label": "consumer", "required": 
false, "type": "boolean", "javaType": "boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": false, 
"configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", 
"configurationField": "configuration", "description": "This options controls 
what happens when a consumer is processing an exchange [...]
     "checkCrcs": { "index": 15, "kind": "parameter", "displayName": "Check 
Crcs", "group": "consumer", "label": "consumer", "required": false, "type": 
"boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": "true", "configurationClass": 
"org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": 
"configuration", "description": "Automatically check the CRC32 of the records 
consumed. This ensures no on-the-wire  [...]
     "commitTimeoutMs": { "index": 16, "kind": "parameter", "displayName": 
"Commit 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 maximum time, in 
milliseconds, that the code will wait for a synchro [...]
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 ad494a210a2..9e0ad4a57d8 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
@@ -355,7 +355,7 @@ public class KafkaConfiguration implements Cloneable, 
HeaderFilterStrategyAware
     @UriParam(label = "common,security")
     private String kerberosConfigLocation;
 
-    @UriParam(label = "consumer", defaultValue = "false")
+    @UriParam(label = "consumer")
     private boolean batching;
 
     public KafkaConfiguration() {
@@ -1996,7 +1996,13 @@ public class KafkaConfiguration implements Cloneable, 
HeaderFilterStrategyAware
     }
 
     /**
-     * Whether to use batching for processing or streaming. The default is 
false, which uses streaming
+     * Whether to use batching for processing or streaming. The default is 
false, which uses streaming.
+     *
+     * In streaming mode, then a single kafka record is processed per Camel 
exchange in the message body.
+     *
+     * In batching mode, then Camel groups many kafka records together as a 
List<Exchange> objects
+     * in the message body. The option maxPollRecords is used to define the 
number of records to group together
+     * in batching mode.
      */
     public void setBatching(boolean batching) {
         this.batching = batching;
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 2add3a3aa11..0a8b4f2b2f7 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
@@ -308,7 +308,11 @@ public interface KafkaComponentBuilderFactory {
         
         /**
          * Whether to use batching for processing or streaming. The default is
-         * false, which uses streaming.
+         * false, which uses streaming. In streaming mode, then a single kafka
+         * record is processed per Camel exchange in the message body. In
+         * batching mode, then Camel groups many kafka records together as a
+         * List objects in the message body. The option maxPollRecords is used
+         * to define the number of records to group together in batching mode.
          * 
          * The option is a: &lt;code&gt;boolean&lt;/code&gt; type.
          * 
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 5b27a594f08..feba1c7f451 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
@@ -439,7 +439,11 @@ public interface KafkaEndpointBuilderFactory {
         }
         /**
          * Whether to use batching for processing or streaming. The default is
-         * false, which uses streaming.
+         * false, which uses streaming. In streaming mode, then a single kafka
+         * record is processed per Camel exchange in the message body. In
+         * batching mode, then Camel groups many kafka records together as a
+         * List objects in the message body. The option maxPollRecords is used
+         * to define the number of records to group together in batching mode.
          * 
          * The option is a: <code>boolean</code> type.
          * 
@@ -455,7 +459,11 @@ public interface KafkaEndpointBuilderFactory {
         }
         /**
          * Whether to use batching for processing or streaming. The default is
-         * false, which uses streaming.
+         * false, which uses streaming. In streaming mode, then a single kafka
+         * record is processed per Camel exchange in the message body. In
+         * batching mode, then Camel groups many kafka records together as a
+         * List objects in the message body. The option maxPollRecords is used
+         * to define the number of records to group together in batching mode.
          * 
          * The option will be converted to a <code>boolean</code> type.
          * 

Reply via email to