spring-cloud-stream
spring-cloud-stream copied to clipboard
@Component annotated beans composition doesn't work
Hello, I try to use composition of two functions annotated with @Component,
and I get null as argument.
Without composition works as expected.
@Bean annotated functions composition work as expected as well.
spring-cloud-stream-binder-kafka:4.0.3
and
spring-cloud-stream-binder-kafka-streams:4.0.3
@LiquidSelf, Could you put these components in a sample project and share with us? We can then triage the issue further to identify the issue.
@LiquidSelf, Could you put these components in a sample project and share with us? We can then triage the issue further to identify the issue.
as simple as that https://github.com/LiquidSelf/sample/blob/main/src/main/resources/application.yaml#L6
@LiquidSelf Thank you for the sample. I just added a fix where the Kafka Streams binder now supports Component beans for function composition. Could you test your app against the latest snapshot (4.1.2-SNAPSHOT)? Thanks!
@LiquidSelf, Were you able to verify the fix?
@LiquidSelf, Were you able to verify the fix?
hello, only fast verify on mock-demo project, fix works,
but first component function getting called two times,
and processing happens two times for first function in composition (only first) ,
e.g:
test-1#apply gets called two times,
As a result processing occurs 2 times as well