EventStore.JVM icon indicating copy to clipboard operation
EventStore.JVM copied to clipboard

Exception instead of actor stop on cluster failure?

Open reinierl opened this issue 8 years ago • 3 comments

In https://github.com/EventStore/EventStore.JVM/blob/8708a3f14f82dfdfef9077bec7c8644aa0711640/src/main/scala/eventstore/tcp/ConnectionActor.scala#L143-L146, the ConnectionActor is stopped when it definitively fails to connect to a cluster after a configurable number of tries. This forces us to use DeathWatch to respond to this, and we're not entirely sure of why the actor died.

Is there a reason that the actor stops itself, rather than throwing a Throwable that could be handled by the Akka supervision system?

reinierl avatar Mar 30 '17 10:03 reinierl

good question. On one hand client users should not bother with supervision, as basically client already doing a lot for this internally. On other hand it does not align with akka ideology.

But in case event store connection is a system critical component, it is better to throw an exception. So let's improve part.

t3hnar avatar Mar 30 '17 10:03 t3hnar

Is this being picked up? Otherwise I could always take a peek - should be a quick fix.

michielboekhoff avatar Jun 19 '17 08:06 michielboekhoff

please go ahead and fire a pull request :)

t3hnar avatar Jun 19 '17 08:06 t3hnar