Skip to Content
Hands-On Reactive Programming in Spring 5
book

Hands-On Reactive Programming in Spring 5

by Oleh Dokuka, Igor Lozynskyi
October 2018
Intermediate to advanced
556 pages
15h 18m
English
Packt Publishing
Content preview from Hands-On Reactive Programming in Spring 5

Subscription-time

The second important phase of the execution life cycle in the stream is the subscription-time. Subscription happens when we subscribe to a given Publisher. For example, the following code demonstrates how to subscribe to the aforementioned execution flow:

... filteredFlux.subscribe(...);

As we may remember from previous sections, in order to build an execution flow, we pass Publishers inside each other. So, we have a chain of Publishers. Once, we subscribe to the top wrapper, we start the subscription process of that chain. The following pseudocode shows how a Subscriber is propagated through the chain of Subscribers during the subscription time:

filterFlux.subscribe(Subscriber) {  mapFlux.subscribe(new FilterSubscriber(Subscriber)) ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Spring Microservices in Action, Second Edition

Spring Microservices in Action, Second Edition

John Carnell, Illary Huaylupo Sanchez

Publisher Resources

ISBN: 9781787284951Supplemental Content