简体   繁体   中英

spring-cloud-starter-stream-kafka does not creates topic provided to spring.boot.cloud.stream.bindings.output.destination

I am using spring-cloud-starter-stream-kafka and spring-cloud-stream jars for kafka in the spring boot application.

The version of the jar is 1.1.1.RELEASE and we are creating producer named as Test. For the same following is application.yml file.

spring.boot.cloud.stream.bindings.output:
                                    destination: Test
                                    content-type: application/octet-stream
                                    producer:
                                      headerMode: raw
                                      requiredGroups: testConsumerGroup

The problem is sometimes when we run the application in docker(using docker-compose) instead of creating Test topic, it is creating "output" as a topic. For kafka I am using wurstmeister/kafka(Tag 0.9.0.1-1) image and wurstmeister/zookeeper. Tried updating the properties but it is not working.

Update: After the debugging get to know that bindingServiceProperties does not hold the bindings and hence spring cloud stream is creating topic as "output"

It looks like this version of the library has the bug. So, Updated the version of the library and now its working fine.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM