spring-cloud / spring-cloud-consul

Spring Cloud Consul
http://cloud.spring.io/spring-cloud-consul/
Apache License 2.0
813 stars 541 forks source link

Add option for re-registration when ephemeral Consul is restarted #691

Closed making closed 3 years ago

making commented 3 years ago

Fixes gh-197 .

I haven't updated the doc as TTL is not yet documented.

making commented 3 years ago

I haven't updated the doc as TTL is not yet documented.

I found the doc about TTL is included in #690

pcornelissen commented 3 years ago

I have not checked your PR, but I just wanted to document my idea somewhere: A good indicator if the service needs to register in consul (again) is that when it fetches the instances list from consul and itself is not included in that list. The neat thing is that this criteria would remove the necessity to register programatically on startup, because the service can just connect to consul and start fetching the instance list and then (obviously) it's not present yet and the criteria above would trigger a registration.

Just my 2C, I'm not sure if that is feasible or the best way