Reputation: 1640
I have a Kafka stream processor that has to take one item as input, and produces multiple item as output.
What is the right way to code it ? Are multiple calls to this.context().forward(key, item)
the right way to do it, or is there another cheat ?
Thanks.
Upvotes: 1
Views: 385
Reputation: 62285
For Processor API, context.forward(key, item)
is correct.
For DSL, you could also use KStream#flatMapValues()
or KStream()flatMap()
.
Upvotes: 2