October 2018
Intermediate to advanced
556 pages
15h 18m
English
The final step of the stream execution is a runtime phase. During that phase, we have an actual signals' exchange between a Publisher and a Subscriber. As we may remember from the Reactive Streams specification, the first two signals that Publisher and Subscriber exchange is the onSubscribe signal and the request signal. The onSubscribe method is called by the top source, which in our case is ArrayPublisher. This passes its Subscription to the given Subscriber. The pseudocode that describes the process of passing Subscription through ever Subscribers looks like the following:
MapSubscriber(FilterSubscriber(Subscriber)).onSubscribe( new ArraySubscription()) { FilterSubscriber(Subscriber).onSubscribe( new MapSubscription(ArraySubscription(...)) ...