mapAsyncPartitionedUnordered

Pass incoming elements to a partitioning function that returns a partition result for each element and then to a processing function that returns a Future result. The resulting Source or Flow will not have ordered elements.

Asynchronous operators

Signature

Source.mapAsyncPartitionedUnordered Flow.mapAsyncPartitionedUnordered

Description

Like mapAsyncUnordered but an intermediate partitioning stage is used. Up to parallelism elements can be processed concurrently for a partition and pushed down the stream regardless of the order of the partitions that triggered them. In other words, the order of the output elements will be preserved only within a partition. For use cases where order matters, mapAsyncPartitioned can be used.

Reactive Streams semantics

emits any of the Future s returned by the provided function complete

backpressures when the number of Future s reaches the configured parallelism and the downstream backpressures

completes upstream completes and all Future s has been completed and all elements has been emitted