I am executing 3 HTTP requests. I want to start everything at the same time, wait for the completion of all, and then merge the three queries, preserving the order of the sequence. Say I have queries r1
, r2
and r3
, and I want to process the results in that order. I tried to do this:
Observable<HttpResponse> r1, r2, r3;
Observable<List<HttpResponse>> merged = Observable.merge(r1, r2, r3).buffer(3);
In this case, there is no guarantee that r3 is index 2 in the returned list. Suggestions?
source
share