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 CompletionStage result. The resulting Source or Flow will not have ordered elements.

Asynchronous operators

Signature

Source.mapAsyncPartitionedUnorderedSource.mapAsyncPartitionedUnordered Flow.mapAsyncPartitionedUnorderedFlow.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 CompletionStage s returned by the provided function complete

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

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