A common task done in ReactiveX is taking two or more Observable<T> instances and merging them into one Observable<T>. This merged Observable<T> subscribes to all of its merged sources simultaneously, making it effective for merging both finite and infinite observables. We can leverage this merging behavior principally in two ways – using factories or using operators. We can use both in the same processing chain too, as described in this section.
Merging factories and operators
Observable.merge() factory and mergeWith() operator
The Observable.merge() factory will take two or more Observable<T> sources emitting the same type T and then consolidate them into a single Observable<T>.
If we...