These are chat archives for ReactiveX/RxJava

14th
Nov 2017
Sudhir Nimavat
@snimavat
Nov 14 2017 13:22
New to RxJava, trying to figure out how to distribute elements amongst subscribers.
eg Observable.from([1,2,3,4] - and there are four subscribers, each of the subscriber should get only one of the number.
using filter is not an option probably, as in my case filter cant decide what to filter on to give each subscriber unique items
What i have is a huge collection that i want to be able to process in parallel by few different subscribers
Oleh Dokuka
@OlegDokuka
Nov 14 2017 13:57
try to look at parallel operator
Sudhir Nimavat
@snimavat
Nov 14 2017 14:31
@OlegDokuka that works, how would i go about blocking the main thread for the parallel flowable to finish !?
Sudhir Nimavat
@snimavat
Nov 14 2017 14:38
sequential()
sorry for the noise
Oleh Dokuka
@OlegDokuka
Nov 14 2017 14:41
hmm
Sudhir Nimavat
@snimavat
Nov 14 2017 15:12
.sequential().blockingForEach({ }) -- is what i was looking for. RxJava2
Thanks @OlegDokuka - Appriciated, I got it working.
Oleh Dokuka
@OlegDokuka
Nov 14 2017 15:36
You are welcome :)
pbagchi
@pbagchi
Nov 14 2017 19:42
Cross posting from stack overflow, hoping someone will have insight into how to get it working - https://stackoverflow.com/questions/47293445/how-to-passing-traceids-in-hystrix-observables