Open reinierl opened 7 years ago
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.
Is this being picked up? Otherwise I could always take a peek - should be a quick fix.
please go ahead and fire a pull request :)
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?