Click or drag to resize
Akka.NETAbstractStageTIn, TOutOnUpstreamFailure Method

OnUpstreamFailure(Exception, IContext) is called when upstream has signaled that the stream is completed with failure. It is not called if OnPull(IContext) or OnPush(TIn, IContext) 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(IContext). 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.42 (1.2.3.42)
Syntax
public abstract ITerminationDirective OnUpstreamFailure(
	Exception cause,
	IContext context
)

Parameters

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

Return Value

Type: ITerminationDirective
TBD
See Also