mapAsync
Pass incoming elements to a function that return a Future
result.
Description
Pass incoming elements to a function that return a Future
result. When the Future
arrives the result is passed downstream. Up to n
elements can be processed concurrently, but regardless of their completion time the incoming order will be kept when results complete. For use cases where order does not matter mapAsyncUnordered
can be used.
If a Future
completes with null
, element is not passed downstream. If a Future
fails, the stream also fails (unless a different supervision strategy is applied)
emits when the Future
returned by the provided function finishes for the next element in sequence
backpressures when the number of Future
s reaches the configured parallelism and the downstream backpressures
completes when upstream completes and all Future
s has been completed and all elements has been emitted