concatMap 'runs' only a single source Observable at a time whereas flatMap subscribes to many of them and if those Observables are async, you get async execution and interleaved emissions between Observables, but values from each of the Observables retain the relative order to each other.b and A is also terminating properly, then you should get an onCompleted() event. Do you have a test case which exhibits the behavior you mentioned?Marble diagrams showing the difference:
concatMap is sequential: http://reactivex.io/RxJava/javadoc/rx/Observable.html#concatMap(rx.functions.Func1)
flatMap is concurrent: http://reactivex.io/RxJava/javadoc/rx/Observable.html#flatMap(rx.functions.Func1)


Note the interleaving on flatMap.
Oh, I know, concat map is A->onNext->onNext->onNext->onComplete->B->onNext->onNext->onNext->onComplete, but flatmap is
A->onNext->onNext->onNext->onComplete
| | | |
B->onNext->onNext->onNext->onComplete
A.concatmap(b).subscribe(subscriber)`, if the b call the onComplete, subsriber's onComplete will not be invoked? why? the same as flatmap.
The completion of b should invoke onCompleted(). do you have a test case that demonstrates your problem?
Closing due to inactivity.
Thank You. It helped me to understand difference :)
Most helpful comment
Marble diagrams showing the difference:
concatMap is sequential: http://reactivex.io/RxJava/javadoc/rx/Observable.html#concatMap(rx.functions.Func1)
flatMap is concurrent: http://reactivex.io/RxJava/javadoc/rx/Observable.html#flatMap(rx.functions.Func1)
Note the interleaving on flatMap.