scale one service to two or more instances
vtolstov opened this issue · 1 comments
Does it possible to have aiblity to spawn another instance of service that already running?
For example i have one kafka service that subscribed to some topic and want to start another service to form consumer group and fetch messages?
suture does not have any sort of special support for it for spawning new services in reaction to something, but services can be added to a supervisor or removed from them at any time. However it is that you detect there is a new topic, if it has the supervisor available to it it can add a new service whenever one is detected. If a topic terminates, the service can return ErrDoNotRestart to terminate "normally" without being restarted.
Please feel free to continue asking questions; I'm going to close this as complete because I definitely do not see an action item for suture here, but I'm not trying to shut you down, just keep the open tickets tidy.