From 4c34382009c950383780b921d255e5bef167d69b Mon Sep 17 00:00:00 2001 From: Sreedhar Pelluru Date: Mon, 28 Nov 2022 13:29:32 -0500 Subject: [PATCH] first param should be byte[] - as per Eric Lam --- tutorials/interop/README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tutorials/interop/README.md b/tutorials/interop/README.md index 56d7d2c..8e9a8f3 100644 --- a/tutorials/interop/README.md +++ b/tutorials/interop/README.md @@ -38,11 +38,11 @@ and ByteArrayDeserializer: // add other properties properties.put(ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG, ByteArraySerializer.class.getName()); - final KafkaProducer producer = new KafkaProducer(properties); + final KafkaProducer producer = new KafkaProducer(properties); final byte[] eventBody = new byte[] { 0x01, 0x02, 0x03, 0x04 }; - ProducerRecord pr = - new ProducerRecord(myTopic, myPartitionId, myTimeStamp, eventBody); + ProducerRecord pr = + new ProducerRecord(myTopic, myPartitionId, myTimeStamp, eventBody); /* send pr */ ``` @@ -53,9 +53,9 @@ and ByteArrayDeserializer: // add other properties properties.put(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG, ByteArrayDeserializer.class.getName()); - final KafkaConsumer consumer = new KafkaConsumer(properties); + final KafkaConsumer consumer = new KafkaConsumer(properties); - ConsumerRecord cr = /* receive event */ + ConsumerRecord cr = /* receive event */ // cr.value() is a byte[] with values { 0x01, 0x02, 0x03, 0x04 } ```