Processor is both Producer and Consumer. It consumes the data from 1 topic and produces data for another topic.
In our case, we have to do the following
consume the data from numbers topic
remove the odd numbers
squares the even number
write back into another topic.
Lets create the processor by using the corresponding Functional Interface in Java which is Function
We consume the data which is KStream
We do some processing
Then we return the KStream