Skip to content

A way to determine that all local services are registered and available to other services. #1240

Answered by ccampanale
DonVietnam asked this question in Q&A
Discussion options

You must be logged in to vote

Again, debug logs and some sample code to really understand the problem would be required to dig in further on this.

...the only question is how to avoid this?

Not entirely sure but, using the internal $services.changed event might be a solution. Outside of that I think I would try to queue "service 1 ready events" in service 2 instances and use the local registry via the internal service actions to process these queued events only when the service is confirmed to be available. You'd probably want to implement some re-queuing and timeout logic for resiliency but I think some of the supported task mixins could prove useful.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@DonVietnam
Comment options

@ccampanale
Comment options

Answer selected by DonVietnam
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants