I have the following code
@SpringBootApplication
public class EnrichmentProcessPOC {
public static void main(String[] args) {
SpringApplication.run(EnrichmentProcessPOC.class, args);
}
public static class EnrichmentProcessorApplication {
public static final String INPUT_TOPIC = "PAYMENT_MSG";
public static final String OUTPUT_TOPIC = "PAYMENT_MSG_CIF";
@Bean
public Function<KStream<Bytes, String>, KStream<Bytes, String>> process() {
return input -> input.mapValues(value -> "foo");
}
}
}
My expectation is that this should replace every messaged consumed with "foo", but all it does is replicate the message on the producer topic. What am I missing here, and why is it doing this?
I also tried using a Transformer, but it has the same behavior. What is the simplest way to actually transform a message into "foo"?