Closed nilusilu95 closed 1 year ago
If I read correctly, you observed that your program with "spring.cloud.stream.binders" for 2 GCP pubsub topics failed. Would share a minimum reproducible project? (The latest of 3.x is v3.4.7)
@nilusilu95 If this is still an issue, would you please reopen this ticket with a minimum reproducible project?
Describe the bug The application is reading from multiple kafka topics and it works well with multi binder configuration of spring cloud stream. This needs to read from gcp pubsub and it fails.
APPLICATION FAILED TO START Description: A component required a bean of type 'org.springframework.cloud.stream.binder.Binder' that could not be found. Action: Consider defining a bean of type 'org.springframework.cloud.stream.binder.Binder' in your configuration.
Using dependency management spring.boot.version: 2.7.2 spring-cloud.version: 2021.0.3 spring-cloud.gcp.version: 3.3.0
spring cloud stream : 3.2.6 kafka binder : 3.2.4 pubsub binder: 3.3.0
Sample
--Spring config starts--
--Spring config ends--
My observation is when it doesn't work with multibinder configuration. I don't use spring.cloud.stream.binders and use only single gcp topic, it works. If I use another gcp/kafka topic, I have to use this property(multi binder configuration) and it doesn't work.
If I use another kafka config to produce using stream bridge, it gives
No qualifying bean of type 'org.springframework.cloud.stream.binder.Binder<?, ?, ?>' available.
There is similar issue reported (multiple gcp binder) https://stackoverflow.com/questions/74926366/spring-cloud-stream-streambridge-with-gcp-pubsub-binder