I have a Kafka consumer that is implemented using Spring's Kafka Streams API. The consumer looks something like this:
@Bean
public Consumer<KStream<String, Foo>> fooProcess() {
return input -> input
.foreach((key, value) -> {
processFoo(value);
});
}
The problem I'm having is that messages consumed from this topic are serialized as type some.package.foo
, but my application uses some.other.package.foo
. I know it's possible to map these two types using standard Spring Kafka, but I can't for the life of me figure out how to specify this mapping when using the streams API.
Any guidance would be greatly appreciated!