akka-grpc
akka-grpc copied to clipboard
feat: Periodic client discovery refresh #1152
New per-service client config with an interval to trigger (possibly) cache-piercing refresh of discovered endpoints for a service.
Depends on upstream API addition in Akka.
References #1152
It is a bit hard to provide a regular programmatic hook since the AkkaDiscoveryNameResolver instance is created deep behind the scenes depending on backend and discovery used. I guess one way would be to have it listen to a stream or topic or something like that.
Note that the refresh is in the client config so can be set separately for each specific endpoint via service name in config (or with code in the used GrpcClientSettings).
@Marcus-Rosti @danieltahara how important is the ability to do a manual call if periodic refresh is in place with this PR?
@Marcus-Rosti @danieltahara how important is the ability to do a manual call if periodic refresh is in place with this PR?
I think for our use case, manual isn't necessary, although I agree the ideal would be to have a trigger so it could just be directly synced to k8s events.