consul-client
consul-client copied to clipboard
Add automatic deregistration option
Added deregistration option when service is failing, greatly helps when service was killed with -9 option.
If you guys want to update Registration class, here is the change.
Do we need to add https://github.com/OrbitzWorldwide/consul-client/pull/168 in another spot?
Make a PR and I'll merge it
This already exists. Consul keeps track of this timer for health checks, not service instances. You can add a deregisterCriticalServiceAfter to any health check:
Registration.RegCheck deadManSwitch = ImmutableRegCheck.builder()
.ttl("10s")
.deregisterCriticalServiceAfter("3h")
.build();