本文介绍了在运行时更改 spring-cloud-stream 实例索引/计数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 spring-cloud-stream 中,有没有办法在不重启应用程序的情况下更改应用程序的实例计数和实例索引?

In spring-cloud-stream, is there a way to change the instance count and instance index of an application without restarting it?

另外,有没有推荐的方法来自动填充这些值?在微服务世界中,这似乎非常困难,因为服务一直在启动和停止.

Also, is there any recommended way to automatically populate these values? In the microservices world, this seems like it would prohibitively difficult, since services are starting and stopping all the time.

推荐答案

不在当前版本中,但可以在 GitHub 问题的上下文中讨论这个问题.

Not in the current version, but open to discuss this in the context of a GitHub issue.

另外,有没有推荐的方法来自动填充这些值?在微服务世界中,这似乎非常困难,因为服务一直在启动和停止.

我的建议是查看 http://cloud.spring.io/spring-cloud-dataflow/ 有助于编排复杂的微服务拓扑(旨在与 Spring Cloud Stream 结合用于流式传输场景)

My recommendation would be to look at http://cloud.spring.io/spring-cloud-dataflow/ which helps with the orchestration of complex microservice topologies (and is designed to work in conjunction with Spring Cloud Stream for streaming scenarios)

这篇关于在运行时更改 spring-cloud-stream 实例索引/计数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-21 02:48