Closed manishatGit closed 4 months ago
I've investigated this issue, and came to the conclusion that this issue can't be Axon related. Axon only reads from the discovery service (upon each heartbeat) to update its internal view of what the capabilities of the nodes around it are. It fetches those capabilities by calling an endpoint on the services that are published as being available.
Self-preservation mode is a feature of Eureka to prevent services from being marked as unavailable in case of a network failure or glitch.
Spring Cloud Discovery does te registration or deregistration of services with the Discovery Server. It might be that there is something at fault there.
If you have any indication that Axon does influence the re-registration of nodes, feel free to commend and reopen the ticket.
Basic information
axon-bom:4.9.4'
Steps to reproduce
http://eureka-host:8761
Expected behavior
As soon as the Axon application dies it should deregister itself with Eureka Service and never re-register until the next heartbeat event.
Actual behavior
When an application shuts down, it de-registers itself with the Eureka server with the status DOWN and registers itself again without having the status UP with the application. This is causing the dead application instance to still be in the list of members to which commands can be routed for some time and eventually removed. The application should immediately de-register and never register in case of an application shutdown event.