3

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.

Cobra1117
  • 1,150
  • 3
  • 11
  • 26

1 Answers1

1

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

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

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.

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)

Marius Bogoevici
  • 2,380
  • 1
  • 13
  • 14
  • Gotcha. Will the instance count and index still be required once Kafka 0.9 is supported? (Right now they seem to be required when using consumer groups.) – Cobra1117 Jun 02 '16 at 14:54
  • In some cases we will want to use them, e.g. to pin partitions to specific instances. But with Kafka 0.9 they will not be required anymore. – Marius Bogoevici Jun 02 '16 at 21:29
  • Cool. That'll make microservices WAY easier to deal with. Thanks for the info! – Cobra1117 Jun 02 '16 at 21:31