I need to call one service from the other so I want to be sure it's ready before I use it. In my case, both microservices are running in the same database.
In the startup script, I would like to wait until the dependency is operational and abort if it isn't ready after a specified time. So this leads to the questions:
- How do I detect whether another microservice is started?
- What is the best approach to wait for another microservice to start.
- If it doesn't start what is the right way to abort starting the current microservice.
Thanks.