Created
May 19, 2022 15:32
-
-
Save NajeebArif/614f7e83903a565d1871effeacb7fe08 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Bean | |
public Function<KStream<String, OrderInputMsg>, KStream<String, OrderInputMsg>> orderProcessWithSideEffect(){ | |
return stringOrderInputMsgKStream -> { | |
KStream<String, String> stringStringKStream = stringOrderInputMsgKStream | |
.mapValues((readOnlyKey, value) -> value.getOrderId()); | |
stringStringKStream.to("out-textMsg-topic-0", Produced.with(Serdes.String(), Serdes.String())); | |
return stringOrderInputMsgKStream | |
.mapValues((readOnlyKey, value) -> OrderProcessorService.processOrderMsg(value)); | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment