reactive-consul icon indicating copy to clipboard operation
reactive-consul copied to clipboard

getService doesn't filter unhealthy services

Open sjoerdmulder opened this issue 6 years ago • 1 comments

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?

sjoerdmulder avatar Jul 02 '18 15:07 sjoerdmulder

FYI, we have added support ourselfs in the fork here: https://github.com/crobox/reactive-consul/commit/d0e041dc113bbfb0d3553ae5b75e934afac9ebfa thanks to @ecyshor

sjoerdmulder avatar Sep 04 '18 12:09 sjoerdmulder