在代码中配置Spring Cloud Stream绑定(而不是application.properties)

时间:2019-08-02 15:16:08

标签: spring-boot spring-cloud-stream application.properties

对于Spring Cloud流中的每个绑定,我们目前在application.properties中至少具有那些配置:

spring.cloud.stream.bindings.ImporterInput.destination=rabbit-exchange
spring.cloud.stream.bindings.ImporterOutput.destination=rabbit-exchange

spring.cloud.stream.bindings.ImporterInput.group=pdimporter
spring.cloud.stream.bindings.ImporterInput.consumer.max-attempts=1
spring.cloud.stream.rabbit.bindings.ImporterInput.consumer.auto-bind-dlq=true
spring.cloud.stream.rabbit.bindings.ImporterInput.consumer.republish-to-dlq=true

是否可以直接在@StreamListeners中配置(至少部分)那些设置以实现更多的按代码配置?

0 个答案:

没有答案