vert-x3 / vertx-service-discovery

Some tools one can use for doing microservices with Vert.x
Apache License 2.0
114 stars 67 forks source link

Consul Bridge imports unhealthy services #83

Closed marksmithson closed 3 years ago

marksmithson commented 6 years ago

It looks like the bridge is importing services which are registered in consul but which are not passing (healthy).

Is there a reason for this, or should the bridge limit the services it imports to those that are healthy?

it should be a simple case of replacing the call to client.catalogServiceNodes in ConsulServiceImporter to client. healthServiceNodes and handling the slightly different JSON that API returns.

Happy to put a PR together for this as long as I have not missed anything and there is a reason to include services that are not passing Consul health checks.

cescoffier commented 6 years ago

@marksmithson PRs are always welcome

@ruslansennov what do you think?

ruslansennov commented 6 years ago

I believe that Mark is absolutely right, only healthy services make sense as a result of service discovery

marksmithson commented 6 years ago

Great, will get a PR for you. Already got it working with the previous version, prior to the consul-client being used.

Mark

On 5 Mar 2018 18:30, "Ruslan Sennov" notifications@github.com wrote:

I believe that Mark is absolutely right, only healthy services make sense as a result of service discovery

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/vert-x3/vertx-service-discovery/issues/83#issuecomment-370516644, or mute the thread https://github.com/notifications/unsubscribe-auth/AA5UvntjoQ7BtA_UU4Sa1IJRC16Bw0OSks5tbYRYgaJpZM4R8-hW .

-- http://carsnip.com

Carsnip Ltd - 09296599. 1 Columbus Walk - Brigantine Place - Cardiff - CF10 4BY

ruslansennov commented 6 years ago

https://github.com/vert-x3/wiki/wiki/3.6.0-Breaking-Changes#vertx-service-discovery