0

IN Spring boot Kafka STream I have following KStream:

Function<KStream<String,InputType>, KStream<String, OutputType>> process() {
}

So here input is of InputType object and output content is OutputType object. For this I want to write a custom serde. What my understanding is that in Serde ser/der should be of same data type. SO how can I write a serde that accept one object and send other object. OR SHoul I consider custom ser/deser in this case?

Manish Kumar
  • 10,214
  • 25
  • 77
  • 147

1 Answers1

0

You need to create two custom Serde implementations - something like InputTypeSerde implements Serde<InputType> and OutputTypeSerde implements Serde<OutputType>. Then you can create two separate beans for them in your application. Binder should pick them up and assign them to the proper input and output bindings.

sobychacko
  • 5,099
  • 15
  • 26