Flow.asFlowWithContext

Turns a Flow into a FlowWithContext which can propagate a context per element along a stream.

Simple operators

Signature

Flow.asFlowWithContextFlow.asFlowWithContext

Description

See Context Propagation for a general overview of context propagation.

Turns a FlowFlow into a FlowWithContextFlowWithContext which can propagate a context per element along a stream. The first function passed into asFlowWithContext must turn each incoming pair of element and context value into an element of this FlowFlow. The second function passed into asFlowWithContext must turn each outgoing element of this FlowFlow into an outgoing context value.

Found an error in this documentation? The source code for this page can be found here. Please feel free to edit and contribute a pull request.