Detect stalled reception
Created originally on Bitbucket by cdevienne (Christophe de Vienne)
If an emitter (or a worker) stops emitting fragments of an envelope before the end, the associated process gets stalled, and the downstream actors will wait the next fragments forever.
Since by default an actor cannot handle more than one Actor.Process at the same time, a single misbehaving emitter can block all processes that need this actor.
If we exclude purposefully misbehaving actors (which we choose to deal with later), the simplest solution is to force the emitter to send fragments, even empty ones, at a given minimum rate.
The rate could be defined by the sender (within a certain range), so a fast sender failure can be detected soon, an a slow sender can still send at its rhythm.
Once detected, a sender failure should stop the process. Any more fragment of the concerned envelopes should be refused with a "Process Stopped" error.