Using mergeMap and concatMap Functions

Learn how to use mergeMap and concatMap functions to process emitted values from Observables in or out of order.

Observable emits out of order

When an Observable emits values, the values emitted may arrive at a subscriber out of order.

Let’s assume that an Observable takes three seconds to emit a single value, and then two seconds to emit another value, and finally, one second to emit the third value.

This can be simulated as follows:

Get hands-on with 1200+ tech skills courses.