Closed spencergibb closed 4 years ago
Hi,
I also had conflict between cloud stream and cloud bus. I tested this PR into my project that used spring stream with function, so I already have a properties "spring.cloud.stream.function.definition", and it's work only if I add "busConsumer" manualy to this properties. BusEnvironmentPostProcessor does not seem sufficient.
I add your PR into my sample project if you want to try : https://github.com/sliard/spring-cloud-stream-basic/tree/test-cloud-bus
@sliard, don't think this is an issue as the documentation mention that:
"To specify which functional bean to bind to the external destination(s) exposed by the bindings, you must provide spring.cloud.function.definition property."
and also:
"In the event you only have single bean of type java.util.function.[Supplier/Function/Consumer], you can skip the spring.cloud.function.definition property, since such functional bean will be auto-discovered. However, it is considered best practice to use such property to avoid any confusion."
My interpretation is that you should use this property whenever you have more than one functional beans of the same type (including those from your dependencies). The version I am using is spring-cloud-stream 3.1.2.
See also: Spring Cloud Function Support
Rather than the annotation model.
fixes gh-227