Member-only story

Reactive Programming (Reactor)- Part 2- FlatMap

Kondah Mouad
6 min readMar 1, 2021

--

In Reactive Programming (Reactor)- Part 1, we explored the fundamentals of Reactive programming and discussed briefly Reactor Project.

In this article we will explore one of the most important and complex operator, FlatMap.

I highly recommend spending some time reading part 1 or any article explaining the basic principle of reactive programming (Reactor or RxJava doesn’t matter), so that you can follow easily.

QueueSubscription

It is basically just queue and subscription under one interface. it allows negotiating the fusion mode between subsequent operators.

The idea is that upstream can provide not only subscription but also allows subscribers to directly access internal queue instead of instantiating their own. Generally after fusion is established, publishers can emit their items in a pull fashion.

Operator Fusion is another topic and is not covered in this post, if you are interested, here is an excellent article explaining the concept:

https://proandroiddev.com/operator-fusion-in-rxjava-2-dcd6612cffae

Merge operator

--

--

Kondah Mouad
Kondah Mouad

No responses yet