Re: Kafka stream specify key for message

2018-06-13 Thread Amrit Jangid
.to() method is called on KStream, like KStream.to(outputTopic, Produced ), See sample code below- KStream inputStream = builder.stream("input-topic"); KStream outputStream = inputStream.map(new KeyValueMapper> { KeyValue apply(String key, String value) { return new

Kafka stream specify key for message

2018-06-13 Thread pradeep s
Hi, In kafka stream, when we use *to *method for sending values to a topic, is there a way to mention the message key . .to(outputTopic, Produced.with(byteArraySerde, itemEnvelopeSerde)); In Produced class , i cant find a way to set the key.