如果 autoStartup 设置为 false,如何手动启动 Spring Cloud Stream Binders [英] How do I start Spring Cloud Stream Binders manually if autoStartup is set to false
问题描述
我正在使用 spring-cloud-starter-stream-kafka
创建一个 Kafka 消费者绑定并且我已经配置了 spring.cloud.stream.bindings.input.consumer.autoStartup
到 false
I'm using spring-cloud-starter-stream-kafka
to create a Kafka consumer binding and I've configured spring.cloud.stream.bindings.input.consumer.autoStartup
to false
我想知道我必须在什么时候注入什么才能启动活页夹(例如通过属性启用的配置).我找不到任何关于此的文档.
I want to know what I have to inject at which time to start the binder (for example through a configuration which is enabled by property). I was not able to find any documentation about this.
谢谢.
推荐答案
使用 BindingsEndpoint
bean 更改状态.
Use the BindingsEndpoint
bean to change the state.
查看我对这个问题的回答.
目前,执行器必须在类路径上.
Currently, the actuator has to be on the class path.
这篇关于如果 autoStartup 设置为 false,如何手动启动 Spring Cloud Stream Binders的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!