reactive-consul
reactive-consul copied to clipboard
getService doesn't filter unhealthy services
Currently it seems that the ConsulHttpClient.getService
method uses the Catalog https://www.consul.io/api/catalog.html#list-nodes-for-service to get all the endpoints for a service; but if a certain endpoint is considered unhealthy (for example since the consul agent is in failed
mode due to network partition the client doesn't excluded it from the available nodes.
Maybe it's better to use the Health https://www.consul.io/api/health.html#list-nodes-for-service for this?
FYI, we have added support ourselfs in the fork here: https://github.com/crobox/reactive-consul/commit/d0e041dc113bbfb0d3553ae5b75e934afac9ebfa thanks to @ecyshor