Given the following code:
KStream<String, Custom> stream =
builder.stream(Serdes.String(), customSerde, "test_in");
stream
.groupByKey(Serdes.String(), customSerde)
.reduce(new CustomReducer(), "reduction_state")
.print(Serdes.String(), customSerde);
I have a statement printlninside the apply method for Reducer that prints successfully when I expect this to happen. However, the last print statement shown above does not display anything. similarly, if I use the method to, but not print, I do not see the messages in the destination subject.
What do I need after the reduction instruction to see the result of the reduction? If a single value is input, I do not expect to see anything. If a second value with the same key is pressed, I expect the reducer to apply (what it does), and I also expect the restore result to continue the next step in the processing pipeline. As described, I do not see anything in the subsequent steps of the pipeline, and I do not understand why.
source
share