You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2020/10/29 18:57:03 UTC

[camel] 02/13: CAMEL-15770 - Kafka serialize/deserialize properties are inconsistently named - keySerializerClass Test

This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit abdd514fd61d14b320e304fa7a3c35df9346cdf2
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Oct 29 18:44:40 2020 +0100

    CAMEL-15770 - Kafka serialize/deserialize properties are inconsistently named - keySerializerClass Test
---
 .../org/apache/camel/catalog/docs/kafka-component.adoc         |  4 ++--
 .../apache/camel/component/kafka/KafkaComponentConfigurer.java | 10 +++++-----
 .../apache/camel/component/kafka/KafkaEndpointConfigurer.java  | 10 +++++-----
 .../apache/camel/component/kafka/KafkaEndpointUriFactory.java  |  2 +-
 .../resources/org/apache/camel/component/kafka/kafka.json      |  4 ++--
 components/camel-kafka/src/main/docs/kafka-component.adoc      |  4 ++--
 .../apache/camel/component/kafka/KafkaProducerFullTest.java    |  2 +-
 .../builder/component/dsl/KafkaComponentBuilderFactory.java    |  8 ++++----
 .../builder/endpoint/dsl/KafkaEndpointBuilderFactory.java      |  5 ++---
 docs/components/modules/ROOT/pages/kafka-component.adoc        |  4 ++--
 10 files changed, 26 insertions(+), 27 deletions(-)

diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/kafka-component.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/kafka-component.adoc
index d04c75b..57badeb 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/kafka-component.adoc
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/kafka-component.adoc
@@ -91,7 +91,7 @@ The Kafka component supports 97 options, which are listed below.
 | *enableIdempotence* (producer) | If set to 'true' the producer will ensure that exactly one copy of each message is written in the stream. If 'false', producer retries may write duplicates of the retried message in the stream. If set to true this option will require max.in.flight.requests.per.connection to be set to 1 and retries cannot be zero and additionally acks must be set to 'all'. | false | boolean
 | *kafkaHeaderSerializer* (producer) | To use a custom KafkaHeaderSerializer to serialize kafka headers values |  | KafkaHeaderSerializer
 | *key* (producer) | The record key (or null if no key is specified). If this option has been configured then it take precedence over header KafkaConstants#KEY |  | String
-| *keySerializerClass* (producer) | The serializer class for keys (defaults to the same as for messages if nothing is given). | org.apache.kafka.common.serialization.StringSerializer | String
+| *keySerializer* (producer) | The serializer class for keys (defaults to the same as for messages if nothing is given). | org.apache.kafka.common.serialization.StringSerializer | String
 | *lazyStartProducer* (producer) | 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 producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and [...]
 | *lingerMs* (producer) | The producer groups together any records that arrive in between request transmissions into a single batched request. Normally this occurs only under load when records arrive faster than they can be sent out. However in some circumstances the client may want to reduce the number of requests even under moderate load. This setting accomplishes this by adding a small amount of artificial delay that is, rather than immediately sending out a record the producer will w [...]
 | *maxBlockMs* (producer) | The configuration controls how long sending to kafka will block. These methods can be blocked for multiple reasons. For e.g: buffer full, metadata unavailable.This configuration imposes maximum limit on the total time spent in fetching metadata, serialization of key and value, partitioning and allocation of buffer memory when doing a send(). In case of partitionsFor(), this configuration imposes a maximum time threshold on waiting for metadata | 60000 | Integer
@@ -218,7 +218,7 @@ with the following path and query parameters:
 | *enableIdempotence* (producer) | If set to 'true' the producer will ensure that exactly one copy of each message is written in the stream. If 'false', producer retries may write duplicates of the retried message in the stream. If set to true this option will require max.in.flight.requests.per.connection to be set to 1 and retries cannot be zero and additionally acks must be set to 'all'. | false | boolean
 | *kafkaHeaderSerializer* (producer) | To use a custom KafkaHeaderSerializer to serialize kafka headers values |  | KafkaHeaderSerializer
 | *key* (producer) | The record key (or null if no key is specified). If this option has been configured then it take precedence over header KafkaConstants#KEY |  | String
-| *keySerializerClass* (producer) | The serializer class for keys (defaults to the same as for messages if nothing is given). | org.apache.kafka.common.serialization.StringSerializer | String
+| *keySerializer* (producer) | The serializer class for keys (defaults to the same as for messages if nothing is given). | org.apache.kafka.common.serialization.StringSerializer | String
 | *lazyStartProducer* (producer) | 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 producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and [...]
 | *lingerMs* (producer) | The producer groups together any records that arrive in between request transmissions into a single batched request. Normally this occurs only under load when records arrive faster than they can be sent out. However in some circumstances the client may want to reduce the number of requests even under moderate load. This setting accomplishes this by adding a small amount of artificial delay that is, rather than immediately sending out a record the producer will w [...]
 | *maxBlockMs* (producer) | The configuration controls how long sending to kafka will block. These methods can be blocked for multiple reasons. For e.g: buffer full, metadata unavailable.This configuration imposes maximum limit on the total time spent in fetching metadata, serialization of key and value, partitioning and allocation of buffer memory when doing a send(). In case of partitionsFor(), this configuration imposes a maximum time threshold on waiting for metadata | 60000 | Integer
diff --git a/components/camel-kafka/src/generated/java/org/apache/camel/component/kafka/KafkaComponentConfigurer.java b/components/camel-kafka/src/generated/java/org/apache/camel/component/kafka/KafkaComponentConfigurer.java
index e90a755..ac443ba 100644
--- a/components/camel-kafka/src/generated/java/org/apache/camel/component/kafka/KafkaComponentConfigurer.java
+++ b/components/camel-kafka/src/generated/java/org/apache/camel/component/kafka/KafkaComponentConfigurer.java
@@ -61,7 +61,7 @@ public class KafkaComponentConfigurer extends PropertyConfigurerSupport implemen
         map.put("enableIdempotence", boolean.class);
         map.put("kafkaHeaderSerializer", org.apache.camel.component.kafka.serde.KafkaHeaderSerializer.class);
         map.put("key", java.lang.String.class);
-        map.put("keySerializerClass", java.lang.String.class);
+        map.put("keySerializer", java.lang.String.class);
         map.put("lazyStartProducer", boolean.class);
         map.put("lingerMs", java.lang.Integer.class);
         map.put("maxBlockMs", java.lang.Integer.class);
@@ -200,8 +200,8 @@ public class KafkaComponentConfigurer extends PropertyConfigurerSupport implemen
         case "key": getOrCreateConfiguration(target).setKey(property(camelContext, java.lang.String.class, value)); return true;
         case "keydeserializer":
         case "keyDeserializer": getOrCreateConfiguration(target).setKeyDeserializer(property(camelContext, java.lang.String.class, value)); return true;
-        case "keyserializerclass":
-        case "keySerializerClass": getOrCreateConfiguration(target).setKeySerializerClass(property(camelContext, java.lang.String.class, value)); return true;
+        case "keyserializer":
+        case "keySerializer": getOrCreateConfiguration(target).setKeySerializer(property(camelContext, java.lang.String.class, value)); return true;
         case "lazystartproducer":
         case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
         case "lingerms":
@@ -402,8 +402,8 @@ public class KafkaComponentConfigurer extends PropertyConfigurerSupport implemen
         case "key": return getOrCreateConfiguration(target).getKey();
         case "keydeserializer":
         case "keyDeserializer": return getOrCreateConfiguration(target).getKeyDeserializer();
-        case "keyserializerclass":
-        case "keySerializerClass": return getOrCreateConfiguration(target).getKeySerializerClass();
+        case "keyserializer":
+        case "keySerializer": return getOrCreateConfiguration(target).getKeySerializer();
         case "lazystartproducer":
         case "lazyStartProducer": return target.isLazyStartProducer();
         case "lingerms":
diff --git a/components/camel-kafka/src/generated/java/org/apache/camel/component/kafka/KafkaEndpointConfigurer.java b/components/camel-kafka/src/generated/java/org/apache/camel/component/kafka/KafkaEndpointConfigurer.java
index 89fd0b2..bbd428c 100644
--- a/components/camel-kafka/src/generated/java/org/apache/camel/component/kafka/KafkaEndpointConfigurer.java
+++ b/components/camel-kafka/src/generated/java/org/apache/camel/component/kafka/KafkaEndpointConfigurer.java
@@ -62,7 +62,7 @@ public class KafkaEndpointConfigurer extends PropertyConfigurerSupport implement
         map.put("enableIdempotence", boolean.class);
         map.put("kafkaHeaderSerializer", org.apache.camel.component.kafka.serde.KafkaHeaderSerializer.class);
         map.put("key", java.lang.String.class);
-        map.put("keySerializerClass", java.lang.String.class);
+        map.put("keySerializer", java.lang.String.class);
         map.put("lazyStartProducer", boolean.class);
         map.put("lingerMs", java.lang.Integer.class);
         map.put("maxBlockMs", java.lang.Integer.class);
@@ -195,8 +195,8 @@ public class KafkaEndpointConfigurer extends PropertyConfigurerSupport implement
         case "key": target.getConfiguration().setKey(property(camelContext, java.lang.String.class, value)); return true;
         case "keydeserializer":
         case "keyDeserializer": target.getConfiguration().setKeyDeserializer(property(camelContext, java.lang.String.class, value)); return true;
-        case "keyserializerclass":
-        case "keySerializerClass": target.getConfiguration().setKeySerializerClass(property(camelContext, java.lang.String.class, value)); return true;
+        case "keyserializer":
+        case "keySerializer": target.getConfiguration().setKeySerializer(property(camelContext, java.lang.String.class, value)); return true;
         case "lazystartproducer":
         case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
         case "lingerms":
@@ -397,8 +397,8 @@ public class KafkaEndpointConfigurer extends PropertyConfigurerSupport implement
         case "key": return target.getConfiguration().getKey();
         case "keydeserializer":
         case "keyDeserializer": return target.getConfiguration().getKeyDeserializer();
-        case "keyserializerclass":
-        case "keySerializerClass": return target.getConfiguration().getKeySerializerClass();
+        case "keyserializer":
+        case "keySerializer": return target.getConfiguration().getKeySerializer();
         case "lazystartproducer":
         case "lazyStartProducer": return target.isLazyStartProducer();
         case "lingerms":
diff --git a/components/camel-kafka/src/generated/java/org/apache/camel/component/kafka/KafkaEndpointUriFactory.java b/components/camel-kafka/src/generated/java/org/apache/camel/component/kafka/KafkaEndpointUriFactory.java
index 21614f1..1aae4ac 100644
--- a/components/camel-kafka/src/generated/java/org/apache/camel/component/kafka/KafkaEndpointUriFactory.java
+++ b/components/camel-kafka/src/generated/java/org/apache/camel/component/kafka/KafkaEndpointUriFactory.java
@@ -50,6 +50,7 @@ public class KafkaEndpointUriFactory extends org.apache.camel.support.component.
         props.add("metricsSampleWindowMs");
         props.add("sslContextParameters");
         props.add("sslKeyPassword");
+        props.add("keySerializer");
         props.add("noOfMetricsSample");
         props.add("maxPartitionFetchBytes");
         props.add("partitionKey");
@@ -80,7 +81,6 @@ public class KafkaEndpointUriFactory extends org.apache.camel.support.component.
         props.add("saslKerberosServiceName");
         props.add("bridgeErrorHandler");
         props.add("shutdownTimeout");
-        props.add("keySerializerClass");
         props.add("saslMechanism");
         props.add("workerPool");
         props.add("lazyStartProducer");
diff --git a/components/camel-kafka/src/generated/resources/org/apache/camel/component/kafka/kafka.json b/components/camel-kafka/src/generated/resources/org/apache/camel/component/kafka/kafka.json
index 91ab79c..20e7293 100644
--- a/components/camel-kafka/src/generated/resources/org/apache/camel/component/kafka/kafka.json
+++ b/components/camel-kafka/src/generated/resources/org/apache/camel/component/kafka/kafka.json
@@ -65,7 +65,7 @@
     "enableIdempotence": { "kind": "property", "displayName": "Enable Idempotence", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "If set to 'true' the producer will ensure that exactly one copy of each message is written in the stream. If 'fa [...]
     "kafkaHeaderSerializer": { "kind": "property", "displayName": "Kafka Header Serializer", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "org.apache.camel.component.kafka.serde.KafkaHeaderSerializer", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "To use a custom KafkaHeaderSerializer to serialize kafka headers values" },
     "key": { "kind": "property", "displayName": "Key", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The record key (or null if no key is specified). If this option has been configured then it take precedence over header KafkaConstants#KEY" },
-    "keySerializerClass": { "kind": "property", "displayName": "Key Serializer Class", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "defaultValue": "org.apache.kafka.common.serialization.StringSerializer", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The serializer class for keys (defaults to the sam [...]
+    "keySerializer": { "kind": "property", "displayName": "Key Serializer", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "defaultValue": "org.apache.kafka.common.serialization.StringSerializer", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The serializer class for keys (defaults to the same as for me [...]
     "lazyStartProducer": { "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": 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 producer may otherwise fail during starting and cause the r [...]
     "lingerMs": { "kind": "property", "displayName": "Linger Ms", "group": "producer", "label": "producer", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "secret": false, "defaultValue": "0", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The producer groups together any records that arrive in between request transmissions into a single batched request. Norma [...]
     "maxBlockMs": { "kind": "property", "displayName": "Max Block Ms", "group": "producer", "label": "producer", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "secret": false, "defaultValue": "60000", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The configuration controls how long sending to kafka will block. These methods can be blocked for multiple reason [...]
@@ -165,7 +165,7 @@
     "enableIdempotence": { "kind": "parameter", "displayName": "Enable Idempotence", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "If set to 'true' the producer will ensure that exactly one copy of each message is written in the stream. If 'f [...]
     "kafkaHeaderSerializer": { "kind": "parameter", "displayName": "Kafka Header Serializer", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "org.apache.camel.component.kafka.serde.KafkaHeaderSerializer", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "To use a custom KafkaHeaderSerializer to serialize kafka headers values" },
     "key": { "kind": "parameter", "displayName": "Key", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The record key (or null if no key is specified). If this option has been configured then it take precedence over header KafkaConstants#KEY" },
-    "keySerializerClass": { "kind": "parameter", "displayName": "Key Serializer Class", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "defaultValue": "org.apache.kafka.common.serialization.StringSerializer", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The serializer class for keys (defaults to the sa [...]
+    "keySerializer": { "kind": "parameter", "displayName": "Key Serializer", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "defaultValue": "org.apache.kafka.common.serialization.StringSerializer", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The serializer class for keys (defaults to the same as for m [...]
     "lazyStartProducer": { "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": 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 producer may otherwise fail during starting and cause the  [...]
     "lingerMs": { "kind": "parameter", "displayName": "Linger Ms", "group": "producer", "label": "producer", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "secret": false, "defaultValue": "0", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The producer groups together any records that arrive in between request transmissions into a single batched request. Norm [...]
     "maxBlockMs": { "kind": "parameter", "displayName": "Max Block Ms", "group": "producer", "label": "producer", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "secret": false, "defaultValue": "60000", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The configuration controls how long sending to kafka will block. These methods can be blocked for multiple reaso [...]
diff --git a/components/camel-kafka/src/main/docs/kafka-component.adoc b/components/camel-kafka/src/main/docs/kafka-component.adoc
index d04c75b..57badeb 100644
--- a/components/camel-kafka/src/main/docs/kafka-component.adoc
+++ b/components/camel-kafka/src/main/docs/kafka-component.adoc
@@ -91,7 +91,7 @@ The Kafka component supports 97 options, which are listed below.
 | *enableIdempotence* (producer) | If set to 'true' the producer will ensure that exactly one copy of each message is written in the stream. If 'false', producer retries may write duplicates of the retried message in the stream. If set to true this option will require max.in.flight.requests.per.connection to be set to 1 and retries cannot be zero and additionally acks must be set to 'all'. | false | boolean
 | *kafkaHeaderSerializer* (producer) | To use a custom KafkaHeaderSerializer to serialize kafka headers values |  | KafkaHeaderSerializer
 | *key* (producer) | The record key (or null if no key is specified). If this option has been configured then it take precedence over header KafkaConstants#KEY |  | String
-| *keySerializerClass* (producer) | The serializer class for keys (defaults to the same as for messages if nothing is given). | org.apache.kafka.common.serialization.StringSerializer | String
+| *keySerializer* (producer) | The serializer class for keys (defaults to the same as for messages if nothing is given). | org.apache.kafka.common.serialization.StringSerializer | String
 | *lazyStartProducer* (producer) | 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 producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and [...]
 | *lingerMs* (producer) | The producer groups together any records that arrive in between request transmissions into a single batched request. Normally this occurs only under load when records arrive faster than they can be sent out. However in some circumstances the client may want to reduce the number of requests even under moderate load. This setting accomplishes this by adding a small amount of artificial delay that is, rather than immediately sending out a record the producer will w [...]
 | *maxBlockMs* (producer) | The configuration controls how long sending to kafka will block. These methods can be blocked for multiple reasons. For e.g: buffer full, metadata unavailable.This configuration imposes maximum limit on the total time spent in fetching metadata, serialization of key and value, partitioning and allocation of buffer memory when doing a send(). In case of partitionsFor(), this configuration imposes a maximum time threshold on waiting for metadata | 60000 | Integer
@@ -218,7 +218,7 @@ with the following path and query parameters:
 | *enableIdempotence* (producer) | If set to 'true' the producer will ensure that exactly one copy of each message is written in the stream. If 'false', producer retries may write duplicates of the retried message in the stream. If set to true this option will require max.in.flight.requests.per.connection to be set to 1 and retries cannot be zero and additionally acks must be set to 'all'. | false | boolean
 | *kafkaHeaderSerializer* (producer) | To use a custom KafkaHeaderSerializer to serialize kafka headers values |  | KafkaHeaderSerializer
 | *key* (producer) | The record key (or null if no key is specified). If this option has been configured then it take precedence over header KafkaConstants#KEY |  | String
-| *keySerializerClass* (producer) | The serializer class for keys (defaults to the same as for messages if nothing is given). | org.apache.kafka.common.serialization.StringSerializer | String
+| *keySerializer* (producer) | The serializer class for keys (defaults to the same as for messages if nothing is given). | org.apache.kafka.common.serialization.StringSerializer | String
 | *lazyStartProducer* (producer) | 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 producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and [...]
 | *lingerMs* (producer) | The producer groups together any records that arrive in between request transmissions into a single batched request. Normally this occurs only under load when records arrive faster than they can be sent out. However in some circumstances the client may want to reduce the number of requests even under moderate load. This setting accomplishes this by adding a small amount of artificial delay that is, rather than immediately sending out a record the producer will w [...]
 | *maxBlockMs* (producer) | The configuration controls how long sending to kafka will block. These methods can be blocked for multiple reasons. For e.g: buffer full, metadata unavailable.This configuration imposes maximum limit on the total time spent in fetching metadata, serialization of key and value, partitioning and allocation of buffer memory when doing a send(). In case of partitionsFor(), this configuration imposes a maximum time threshold on waiting for metadata | 60000 | Integer
diff --git a/components/camel-kafka/src/test/java/org/apache/camel/component/kafka/KafkaProducerFullTest.java b/components/camel-kafka/src/test/java/org/apache/camel/component/kafka/KafkaProducerFullTest.java
index 6515f0e..95e673c 100644
--- a/components/camel-kafka/src/test/java/org/apache/camel/component/kafka/KafkaProducerFullTest.java
+++ b/components/camel-kafka/src/test/java/org/apache/camel/component/kafka/KafkaProducerFullTest.java
@@ -84,7 +84,7 @@ public class KafkaProducerFullTest extends BaseEmbeddedKafkaTest {
 
     @EndpointInject("kafka:" + TOPIC_BYTES + "?requestRequiredAcks=-1"
                     + "&serializerClass=org.apache.kafka.common.serialization.ByteArraySerializer&"
-                    + "keySerializerClass=org.apache.kafka.common.serialization.ByteArraySerializer")
+                    + "keySerializer=org.apache.kafka.common.serialization.ByteArraySerializer")
     private Endpoint toBytes;
 
     @EndpointInject("kafka:" + TOPIC_PROPAGATED_HEADERS + "?requestRequiredAcks=-1")
diff --git a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/KafkaComponentBuilderFactory.java b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/KafkaComponentBuilderFactory.java
index 6110068..061fcc1 100644
--- a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/KafkaComponentBuilderFactory.java
+++ b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/KafkaComponentBuilderFactory.java
@@ -717,9 +717,9 @@ public interface KafkaComponentBuilderFactory {
          * Default: org.apache.kafka.common.serialization.StringSerializer
          * Group: producer
          */
-        default KafkaComponentBuilder keySerializerClass(
-                java.lang.String keySerializerClass) {
-            doSetProperty("keySerializerClass", keySerializerClass);
+        default KafkaComponentBuilder keySerializer(
+                java.lang.String keySerializer) {
+            doSetProperty("keySerializer", keySerializer);
             return this;
         }
         /**
@@ -1608,7 +1608,7 @@ public interface KafkaComponentBuilderFactory {
             case "enableIdempotence": getOrCreateConfiguration((KafkaComponent) component).setEnableIdempotence((boolean) value); return true;
             case "kafkaHeaderSerializer": getOrCreateConfiguration((KafkaComponent) component).setKafkaHeaderSerializer((org.apache.camel.component.kafka.serde.KafkaHeaderSerializer) value); return true;
             case "key": getOrCreateConfiguration((KafkaComponent) component).setKey((java.lang.String) value); return true;
-            case "keySerializerClass": getOrCreateConfiguration((KafkaComponent) component).setKeySerializerClass((java.lang.String) value); return true;
+            case "keySerializer": getOrCreateConfiguration((KafkaComponent) component).setKeySerializer((java.lang.String) value); return true;
             case "lazyStartProducer": ((KafkaComponent) component).setLazyStartProducer((boolean) value); return true;
             case "lingerMs": getOrCreateConfiguration((KafkaComponent) component).setLingerMs((java.lang.Integer) value); return true;
             case "maxBlockMs": getOrCreateConfiguration((KafkaComponent) component).setMaxBlockMs((java.lang.Integer) value); return true;
diff --git a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/KafkaEndpointBuilderFactory.java b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/KafkaEndpointBuilderFactory.java
index b4419dc..27f6a8f 100644
--- a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/KafkaEndpointBuilderFactory.java
+++ b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/KafkaEndpointBuilderFactory.java
@@ -1838,9 +1838,8 @@ public interface KafkaEndpointBuilderFactory {
          * Default: org.apache.kafka.common.serialization.StringSerializer
          * Group: producer
          */
-        default KafkaEndpointProducerBuilder keySerializerClass(
-                String keySerializerClass) {
-            doSetProperty("keySerializerClass", keySerializerClass);
+        default KafkaEndpointProducerBuilder keySerializer(String keySerializer) {
+            doSetProperty("keySerializer", keySerializer);
             return this;
         }
         /**
diff --git a/docs/components/modules/ROOT/pages/kafka-component.adoc b/docs/components/modules/ROOT/pages/kafka-component.adoc
index a580bb2..9e2b92f 100644
--- a/docs/components/modules/ROOT/pages/kafka-component.adoc
+++ b/docs/components/modules/ROOT/pages/kafka-component.adoc
@@ -93,7 +93,7 @@ The Kafka component supports 97 options, which are listed below.
 | *enableIdempotence* (producer) | If set to 'true' the producer will ensure that exactly one copy of each message is written in the stream. If 'false', producer retries may write duplicates of the retried message in the stream. If set to true this option will require max.in.flight.requests.per.connection to be set to 1 and retries cannot be zero and additionally acks must be set to 'all'. | false | boolean
 | *kafkaHeaderSerializer* (producer) | To use a custom KafkaHeaderSerializer to serialize kafka headers values |  | KafkaHeaderSerializer
 | *key* (producer) | The record key (or null if no key is specified). If this option has been configured then it take precedence over header KafkaConstants#KEY |  | String
-| *keySerializerClass* (producer) | The serializer class for keys (defaults to the same as for messages if nothing is given). | org.apache.kafka.common.serialization.StringSerializer | String
+| *keySerializer* (producer) | The serializer class for keys (defaults to the same as for messages if nothing is given). | org.apache.kafka.common.serialization.StringSerializer | String
 | *lazyStartProducer* (producer) | 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 producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and [...]
 | *lingerMs* (producer) | The producer groups together any records that arrive in between request transmissions into a single batched request. Normally this occurs only under load when records arrive faster than they can be sent out. However in some circumstances the client may want to reduce the number of requests even under moderate load. This setting accomplishes this by adding a small amount of artificial delay that is, rather than immediately sending out a record the producer will w [...]
 | *maxBlockMs* (producer) | The configuration controls how long sending to kafka will block. These methods can be blocked for multiple reasons. For e.g: buffer full, metadata unavailable.This configuration imposes maximum limit on the total time spent in fetching metadata, serialization of key and value, partitioning and allocation of buffer memory when doing a send(). In case of partitionsFor(), this configuration imposes a maximum time threshold on waiting for metadata | 60000 | Integer
@@ -220,7 +220,7 @@ with the following path and query parameters:
 | *enableIdempotence* (producer) | If set to 'true' the producer will ensure that exactly one copy of each message is written in the stream. If 'false', producer retries may write duplicates of the retried message in the stream. If set to true this option will require max.in.flight.requests.per.connection to be set to 1 and retries cannot be zero and additionally acks must be set to 'all'. | false | boolean
 | *kafkaHeaderSerializer* (producer) | To use a custom KafkaHeaderSerializer to serialize kafka headers values |  | KafkaHeaderSerializer
 | *key* (producer) | The record key (or null if no key is specified). If this option has been configured then it take precedence over header KafkaConstants#KEY |  | String
-| *keySerializerClass* (producer) | The serializer class for keys (defaults to the same as for messages if nothing is given). | org.apache.kafka.common.serialization.StringSerializer | String
+| *keySerializer* (producer) | The serializer class for keys (defaults to the same as for messages if nothing is given). | org.apache.kafka.common.serialization.StringSerializer | String
 | *lazyStartProducer* (producer) | 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 producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and [...]
 | *lingerMs* (producer) | The producer groups together any records that arrive in between request transmissions into a single batched request. Normally this occurs only under load when records arrive faster than they can be sent out. However in some circumstances the client may want to reduce the number of requests even under moderate load. This setting accomplishes this by adding a small amount of artificial delay that is, rather than immediately sending out a record the producer will w [...]
 | *maxBlockMs* (producer) | The configuration controls how long sending to kafka will block. These methods can be blocked for multiple reasons. For e.g: buffer full, metadata unavailable.This configuration imposes maximum limit on the total time spent in fetching metadata, serialization of key and value, partitioning and allocation of buffer memory when doing a send(). In case of partitionsFor(), this configuration imposes a maximum time threshold on waiting for metadata | 60000 | Integer