在运行时更改 spring-cloud-stream 实例 index/count

Changing spring-cloud-stream instance index/count at runtime

在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?

当前版本中没有,但可以在 GitHub 问题的上下文中讨论。

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.

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