From cc615ae45beceaef415c7461cf1e3d875e6e0509 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20GREFFIER?= Date: Tue, 5 Nov 2024 15:09:02 +0100 Subject: [PATCH] Fix references to SerdesUtils --- README.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 0056159..4026d1f 100644 --- a/README.md +++ b/README.md @@ -173,16 +173,16 @@ Note that all the Kafka Streams properties have been moved under `kafka.properti ## Avro Serializer and Deserializer -Whenever you need to serialize or deserialize records with Avro schemas, you can use the `SerdeUtils` class as follows: +Whenever you need to serialize or deserialize records with Avro schemas, you can use the `SerdesUtils` class as follows: ```java -SerdeUtils.getValueSerde() +SerdesUtils.getValueSerde() ``` or ```java -SerdeUtils.getKeySerde() +SerdesUtils.getKeySerde() ``` Here is an example of using these methods in your topology: @@ -193,8 +193,8 @@ public class MyKafkaStreams extends KafkaStreamsStarter { @Override public void topology(StreamsBuilder streamsBuilder) { streamsBuilder - .stream("INPUT_TOPIC", Consumed.with(Serdes.String(), SerdeUtils.getValueSerde())) - .to("OUTPUT_TOPIC", Produced.with(Serdes.String(), SerdeUtils.getValueSerde())); + .stream("INPUT_TOPIC", Consumed.with(Serdes.String(), SerdesUtils.getValueSerde())) + .to("OUTPUT_TOPIC", Produced.with(Serdes.String(), SerdesUtils.getValueSerde())); } } ``` @@ -234,11 +234,11 @@ public class MyKafkaStreams extends KafkaStreamsStarter { @Override public void topology(StreamsBuilder streamsBuilder) { KStream stream = streamsBuilder - .stream("INPUT_TOPIC", Consumed.with(Serdes.String(), SerdeUtils.getValueSerde())); + .stream("INPUT_TOPIC", Consumed.with(Serdes.String(), SerdesUtils.getValueSerde())); TopologyErrorHandler .catchErrors(stream.mapValues(MyKafkaStreams::toUpperCase)) - .to("OUTPUT_TOPIC", Produced.with(Serdes.String(), SerdeUtils.getValueSerde())); + .to("OUTPUT_TOPIC", Produced.with(Serdes.String(), SerdesUtils.getValueSerde())); } @Override @@ -522,10 +522,10 @@ public class MyKafkaStreamsTest extends KafkaStreamsStarterTest { @BeforeEach void setUp() { inputTopic = testDriver.createInputTopic("INPUT_TOPIC", new StringSerializer(), - SerdeUtils.getValueSerde().serializer()); + SerdesUtils.getValueSerde().serializer()); outputTopic = testDriver.createOutputTopic("OUTPUT_TOPIC", new StringDeserializer(), - SerdeUtils.getValueSerde().deserializer()); + SerdesUtils.getValueSerde().deserializer()); } @Test