liveBook · Manning

Pipeline

As explained in Quarkus in Action

A reactive pipeline is a composition of asynchronous processing stages connected so that results, completion, and failures flow between them.

A reactive pipeline composes asynchronous processing stages into a sequence of continuations. Each stage runs when the previous stage emits an item, and events—including results, completion, and failures—move downstream. Stages can transform, filter, drop, or produce events. The pipeline begins only when a subscriber requests it. section 8.2.2

In Quarkus, SmallRye Mutiny provides the Uni and Multi types and their fluent APIs for defining pipelines. Uni represents one item or failure, while Multi represents streams that may produce multiple items. section 8.2.2 section 8.7

A pipeline commonly combines stages that:

  • Transform emitted items, such as converting strings to uppercase or appending text. section 8.2.2
  • Observe intermediate events without changing them, such as printing each item before passing it downstream. section 8.2.2
  • Filter items and react to completion before delivering results to a subscriber. section 8.2.2

Filtering a Mutiny stream

A Multi emitting "a", "b", and "c" can uppercase each item, print an intermediate message, append " item", filter values beginning with "B", print completion, and subscribe to the remaining results. The subscriber receives "A item" and "C item". section 8.2.2

Figure 8.5 The reactive pipeline visualization in Mutiny
figure

Use the pipeline visualization to trace how emitted events pass through successive Mutiny stages. section 8.2.2

How Quarkus in Action covers it

How deep it goes
Explains stage execution, event flow, subscription, and fluent construction, but does not detail internal implementation.
Examples
Demonstrates a Mutiny Multi that transforms, observes, filters, completes, and delivers selected strings to a subscriber.
What it assumes
Assumes basic asynchronous programming awareness while explaining continuations, events, Uni, Multi, and subscription.
What you can do after
Build reactive pipelines with Mutiny's Uni and Multi fluent APIs, then trigger them through subscription.
How it connects
Connects reactive programming with asynchronous APIs, continuations, event-driven architecture, backpressure, and Reactive Streams.

Also explained in

Compare how 48 books explain pipeline →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Quarkus in Action. The section links point to the parts of the book it draws on.