spring-cloud-netflix
spring-cloud-netflix copied to clipboard
Duplicate event: EurekaInstanceCanceledEvent
Describe the bug
An application that actively unregisters from eureka fires EurekaInstanceCanceledEvent twice.

The REST endpoint for unregister is executed. The first event is fired, as handleCancelation was added directly to the overridden cancel method. The original cancel method delegates to internalCancel which again was overridden by spring and handleCancelation was added there too.
I think it should be save to remove the overridden cancel method and only keep internalCancel.
WDYT?
is it causing a problem?
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.
is it causing a problem?
You can workaround the duplicated event using an own collection to track the active instances. But it's not nice, that the event is fired twice.
After tracking it, it appears to be a duplicate event caused by #1376.
- https://github.com/spring-cloud/spring-cloud-netflix/issues/1376
I think this could be done with one of cancel and internalCancel removed. (Perhaps cancel?)
WDYT? 🤔