Click or drag to resize
Akka.NETSubFlowOperationsRecoverWithRetriesTOut, TMat, TClosed Method
RecoverWithRetries allows to switch to alternative Source on flow failure. It will stay in effect after a failure has been recovered up to attempts number of times so that each time there is a failure it is fed into the partialFunc and a new Source may be materialized. Note that if you pass in 0, this won't attempt to recover at all. Passing in -1 will behave exactly the same as RecoverWithRetriesTOut, TMat, TClosed(SubFlowTOut, TMat, TClosed, FuncException, IGraphSourceShapeTOut, TMat, Int32).

Since the underlying failure signal onError arrives out-of-band, it might jump over existing elements. This stage can recover the failure signal, but not the skipped elements, which will be dropped.

Emits when element is available from the upstream or upstream is failed and element is available from alternative Source

Backpressures when downstream backpressures

Completes when upstream completes or upstream failed with exception partialFunc can handle

Cancels when downstream cancels

Namespace:  Akka.Streams.Dsl
Assembly:  Akka.Streams (in Akka.Streams.dll) Version: 1.2.3.42 (1.2.3.42)
Syntax
public static SubFlow<TOut, TMat, TClosed> RecoverWithRetries<TOut, TMat, TClosed>(
	this SubFlow<TOut, TMat, TClosed> flow,
	Func<Exception, IGraph<SourceShape<TOut>, TMat>> partialFunc,
	int attempts
)

Parameters

flow
Type: Akka.Streams.DslSubFlowTOut, TMat, TClosed
TBD
partialFunc
Type: SystemFuncException, IGraphSourceShapeTOut, TMat
Receives the failure cause and returns the new Source to be materialized if any
attempts
Type: SystemInt32
Maximum number of retries or -1 to retry indefinitely

Type Parameters

TOut
TBD
TMat
TBD
TClosed
TBD

Return Value

Type: SubFlowTOut, TMat, TClosed
TBD

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type SubFlowTOut, TMat, TClosed. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Exceptions
ExceptionCondition
ArgumentExceptionif attempts is a negative number other than -1
See Also