[英]Is it possible to use Spring Cloud Config to pass complex config to a spring cloud stream function
I have a configuration that is an XML file that may be updated at any time.我有一个配置,它是一个可以随时更新的 XML 文件。 I need to use it in a reactive function that I am using in the cloud data stream.
我需要在我在云数据流中使用的反应式函数中使用它。 I was looking into storing it in spring cloud-config and I had a few questions
我正在考虑将它存储在 spring cloud-config 中,但我有几个问题
@Bean
public Function<Flux<List<Record>>, Flux<Object>> doWork(@Value("test") String test)
and test would always have the current value of the XML file from the configuration store.和 test 将始终具有来自配置存储的 XML 文件的当前值。
Reactive functions are only invoked once during the initialisation time to effectively setup a stream.响应式函数仅在初始化期间调用一次以有效设置流。 It is different than imperative functions that Are event driven.
它不同于事件驱动的命令式函数。 So anything that is passed to it via method signature will only represent whatever the value was during that time.
因此,通过方法签名传递给它的任何内容都将仅代表在那段时间内的任何值。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.