Handle eureka client disconnection on the eureka server

Viewed 29

I am trying to understand Spring Cloud's Eureka client/server mechanism. I have built a very basic server and client app using just the @EnableEurekaServer and @EnableDiscoveryClient annotations respectively. I am able to see the registered clients in the eureka dashboard.

I was wondering if there is any way to get notified on the server whenever any client disconnects(goes down).

Example: I have a server and two clients (client1 and client2) registered on it. Now if for any reason client2 goes down, can I get any event on the server so as to perform some tasks (cleanup tasks, calling some APIs etc). Is this possible using eureka or any other library which might plug into eureka clients' lifecycle?

0 Answers
Related