Open LeovR opened 2 days ago
Welcome to Springwolf. Thanks a lot for reporting your first issue. Please check out our contributors guide and feel free to join us on discord.
Hello @LeovR , that is a great addition.
Do you have a code example for the usage with headers? (Can be added to the cloudstream example later) In the docs, I found a section where messages from two different topic are consumed: https://docs.spring.io/spring-cloud-stream/reference/kafka/kafka-streams-binder/programming-model.html#multiple-input-bindings
Feel free (or anyone) to pick this up and contribute
Hi @timonback,
unfortunately this feature is not documented very well. The link you provided is about the Kafka Streams binding and not the "normal" Kafka binding.
I will pick this up myself then and create a pull request when I'm done.
At least I wanted to make sure whether this is wanted.
Describe the feature request With Spring Cloud Stream one is able, in addition to
Function
andConsumer
-Beans to useBiFunction
orBiConsumer
-Beans. E.g. with a Kafka-Binder, aBiConsumer
can be used to also consume the Kafka-Headers. Currently, onlyConsumer
,Function
orSupplier
can be used.In addition, the
DefaultBeanMethodsScanner
should also consider all@Component
-Beans and not just bean-methods in@Configuration
-classes because those can also be provided via other@Component
-annotations.Motivation We're relying on
BiConsumer
to consume headers.Technical details It should be considered, whether the Spring
FunctionCatalog
could be used to get a hold of the function-bindings, since all the scanned functions are already registered in the catalog.