RxJava - flatmap vs concatMap - why is ordering the same on subscription?
<p>According to <a href="https://stackoverflow.com/questions/24571491/what-is-the-difference-between-concatmap-and-flatmap-in-rxjava">this thread</a> conCatMap and flatmap only differ by the order in which items are emitted. So i did a test and created a simple stream of integers and wanted to see in what order they would be emitted.  I made a small observable that would take in numbers in the range from 1-5 and multiple them by two. Easy. </p>

<p>Here is the code with flatmap:</p>

<pre><code>myObservable.flatMap(new Func1&lt;Integer, Observable&lt;Integer&gt;&gt;() {
        @Override
        public Observable&lt;Integer&gt; call(Integer integer) {
            return Observable.just(integer * 2);
        }
    }).subscribe(new Observer&lt;Integer&gt;() {
        @Override
        public void onCompleted() {

        }

        @Override
        public void onError(Throwable e) {

        }

        @Override
        public void onNext(Integer integer) {
        Log.v("myapp","from flatMap:"+integer);
        }
    });
</code></pre>

<p>and the exact same code using concatMap:</p>

<pre><code>myObservable.concatMap(new Func1&lt;Integer, Observable&lt;Integer&gt;&gt;() {
        @Override
        public Observable&lt;Integer&gt; call(Integer integer) {
            return Observable.just(integer * 2);
        }
    }).subscribe(new Observer&lt;Integer&gt;() {
        @Override
        public void onCompleted() {

        }

        @Override
        public void onError(Throwable e) {

        }

        @Override
        public void onNext(Integer integer) {
        Log.v("myapp","from concatmap:"+integer);
        }
    });
</code></pre>

<p>when i saw print out in the logs the ordering was the same for both, why ? I thought only concatMap will preserve order ?</p>