Regarding Sum example
javaHelper opened this issue · 1 comments
javaHelper commented
I'm sending data like below'
kafka-console-producer --bootstrap-server localhost:9092 --topic numbers-topic
>1223
>1223
>
I wonder, why I am getting below response?
kafka-console-consumer --topic sum-of-odd-numbers-topic --from-beginning --bootstrap-server localhost:9092 --property value.deserializer=org.apache.kafka.common.serialization.IntegerDeserializer
1650746470
Also, I'm not clear on how to send data to topic as instructions are not clear to me
OneCricketeer commented
not clear on how to send data to topic
You're already using kafka-console-producer
.
But this accepts strings, not numbers.
why I am getting below response
You'll need to add --property value.serializer
for IntegerSerializer, similar to how you did for the consumer
Or you can edit/run the driver https://github.com/confluentinc/kafka-streams-examples/blob/7.1.1-post/src/main/java/io/confluent/examples/streams/SumLambdaExampleDriver.java#L84