These are chat archives for ReactiveX/RxJava
RxJava – Reactive Extensions for the JVM – a library for composing asynchronous and event-based programs using observable sequences for the Java VM.
Subject<Integer, String> publishSubject = PublishSubject.create()
Is there a way to make requests in parellel in batch. Like, if I have a list of ids and I want to get details of those ids 4 at a time. This is what I have till now
api.users().flatMap(Observable::fromIterable) .buffer(4) .flatMap(users -> Observable.fromIterable(users).flatMap(user -> api.usersData(user.username).subscribeOn(Schedulers.newThread()))) .subscribe(user -> System.out.println(user.toStringNew()), Throwable::printStackTrace);
but this thing makes all requests in parellel, not in batches of 4