Closed philnate closed 7 years ago
I think it's really just an omission, but would be better to have some test-case to play with.
Thank you!
Okay, let me put something together for you to play around.
@artembilan please see https://github.com/philnate/issues/tree/spring-intex-hzlcst-173 for a minimal example of the described scenario. I guess having at least the error logged, would be beneficial.
OK. The problem is confirmed. And that really doesn't look like event publishing error has to lead to revoke leadership.
Yes, I agree: the simple warn
should be great compromise.
One of the workaround is an executor
for the SimpleApplicationEventMulticaster
to prevent exception bubbling from the event listener.
Another solution is a custom LeaderEventPublisher
, probably just a simple extension of the DefaultLeaderEventPublisher
to try...catch
the target delegate invocation.
We would implement that in the DefaultLeaderEventPublisher
, but that really from design perspective doesn't mean that we should allow to blow up granting by the event error.
The try...catch
and warn.
That's all.
For reference: https://jira.spring.io/browse/INT-4220
Hi,
I have the following scenario, where an exception is thrown during the LeaderEvent propagation. It seems like it's actually making it's way into the
org.springframework.integration.hazelcast.leader.LeaderInitiator
class, where it's not catched and even worse the error is swallowed and neither causes the app to die. This will leave you with an broken instance without further details to why it failed.Not sure if I'm doing something wrong in my listener or if the LeaderInitiator should be more safeguarded around the LeaderEvent propagations.