Rxjava: Doubt about the terms Upstream vs Downstream

Created on 26 Jan 2017  路  2Comments  路  Source: ReactiveX/RxJava

Hello everyone,

i'm confused with the terms upstream and downstream, and hope someone could describe better who is who, and maybe illustrate with some examples?

For example, the documentation about zipWith in a Flowable:

The operator expects backpressure from the sources and honors backpressure from the downstream. (I.e., zipping with interval(long, TimeUnit) may result in MissingBackpressureException, use one of the onBackpressureX to handle similar, backpressure-ignoring sources.

How do i interpret it? The downstream is the source i'm zipping (The parameter of zipWith) and the upstream is the Flowable i'm calling zipWith?

Question

Most helpful comment

Let me illustrate it:

           upstream                           downstream
source <------------- operator (parameters) -------------> consumer/further operators

Some operators have multiple upstreams such as zipWith which is an instance convenience for zip(upstream1, upstream2, func2).

All 2 comments

Let me illustrate it:

           upstream                           downstream
source <------------- operator (parameters) -------------> consumer/further operators

Some operators have multiple upstreams such as zipWith which is an instance convenience for zip(upstream1, upstream2, func2).

Thank you @akarnokd, you made it very clear.

Was this page helpful?
0 / 5 - 0 ratings