October 2018
Intermediate to advanced
556 pages
15h 18m
English
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)) ...