O'Reilly logo

Reactive Programming With Java 9 by Tejaswini Mandar Jog

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The behavior of the Publisher-Subscriber system

The following figure helps us understand the flow of an item from the Publisher till it gets subscribed by the Subscriber:

The following discussion will help us understand the publishing-subscribing mechanism:

  • The Publisher uses the subscribe() method denoting that the Subscriber can now subscribe the Publisher.
  • The Subscriber subscribes the Publisher by invoking onSubscribe(). The Subscriber now has Subscription. Each Publisher defines its own Subscription and also has the logic to produce the data for the respective Subscription.
  • The Subscriber uses the Subscription and requests for the items. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required