Click or drag to resize
Akka.NETSourceOperationsGroupByTOut, TMat, TKey Method
This operation demultiplexes the incoming stream into separate output streams, one for each element key. The key is computed for each element using the given function. When a new key is encountered for the first time it is emitted to the downstream subscriber together with a fresh flow that will eventually produce all the elements of the substream for that key. Not consuming the elements from the created streams will stop this processor from processing more elements, therefore you must take care to unblock (or cancel) all of the produced streams even if you want to consume only one of them. If the group by function groupingFunc throws an exception and the supervision decision is Stop the stream and substreams will be completed with failure. If the group by groupingFunc throws an exception and the supervision decision is Resume or Restart the element is dropped and the stream and substreams continue.

Emits when an element for which the grouping function returns a group that has not yet been created. Emits the new group

Backpressures when there is an element pending for a group whose substream backpressures

Completes when upstream completes

Cancels when downstream cancels and all substreams cancel

Namespace:  Akka.Streams.Dsl
Assembly:  Akka.Streams (in Akka.Streams.dll) Version: 1.2.3.129 (1.2.3.129)
Syntax
public static SubFlow<TOut, TMat, IRunnableGraph<TMat>> GroupBy<TOut, TMat, TKey>(
	this Source<TOut, TMat> flow,
	int maxSubstreams,
	Func<TOut, TKey> groupingFunc
)

Parameters

flow
Type: Akka.Streams.DslSourceTOut, TMat
TBD
maxSubstreams
Type: SystemInt32
TBD
groupingFunc
Type: SystemFuncTOut, TKey
TBD

Type Parameters

TOut
TBD
TMat
TBD
TKey
TBD

Return Value

Type: SubFlowTOut, TMat, IRunnableGraphTMat
TBD

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type SourceTOut, TMat. 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).
See Also