akka-streamakka.netakka-remoting

Akka.Net Stream Ordering (Stream Ordering Over the Network)


Does Akka.net Streams preserve input order of elements? If so, does this hold true when working with reactive streams over the network (when using stream refs)?

Current Version of Akka.Streams being used is 1.4.39

Unfortunately, I was unable to find a definitive answer in the Akka.net Documentation.


Solution

  • After further reading I found my answer.

    https://getakka.net/articles/streams/basics.html#stream-ordering

    In Akka Streams almost all computation stages preserve input order of elements. This means that if inputs {IA1,IA2,...,IAn} "cause" outputs {OA1,OA2,...,OAk} and inputs {IB1,IB2,...,IBm} "cause" outputs {OB1,OB2,...,OBl} and all of IAi happened before all IBi then OAi happens before OBi.

    This property is even uphold by async operations such as SelectAsync, however an unordered version exists called SelectAsyncUnordered which does not preserve this ordering.

    ...