0
KStream<String, String> left = builder.stream("source1");

left.toStream("soure2")

want to serialize before sending to source2

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245

1 Answers1

0
GenericRecord genericRecord2 = new GenericData.Record(schema);

Get the schema using GenericRecord obj and then put key, value in`

genericRecord2.put(k, v);

and once you are done with put operation, Write it to the topic using .to() method of the kstream api

.to("topic",Produced.with(stringSerde, genericAvroSerde));`

Make sure to register the avro schema in the schema-registry

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245