Click or drag to resize
Akka.NETAbstractStageTIn, TOut, TPushDirective, TPullDirective, TContextOnUpstreamFailure Method (Exception, IContext)

OnUpstreamFailure(Exception, IContext) is called when upstream has signaled that the stream is completed with failure. It is not called if OnPull(TContext) or OnPush(TIn, TContext) of the stage itself throws an exception.

Note that elements that were emitted by upstream before the failure happened might not have been received by this stage when OnUpstreamFailure(Exception, IContext) is called, i.e. failures are not backpressured and might be propagated as soon as possible.

Here you cannot call Push(Object), because there might not be any demand from downstream. To emit additional elements before terminating you can use AbsorbTermination and push final elements from OnPull(TContext). The stage will then be in finishing state, which can be checked with IsFinishing.

Namespace:  Akka.Streams.Stage
Assembly:  Akka.Streams (in Akka.Streams.dll) Version: 1.2.3.129 (1.2.3.129)
Syntax
public override sealed ITerminationDirective OnUpstreamFailure(
	Exception cause,
	IContext context
)

Parameters

cause
Type: SystemException
TBD
context
Type: Akka.Streams.StageIContext
TBD

Return Value

Type: ITerminationDirective
TBD
See Also