RxJava concurrency with multiple subscribers and events
问题 I'm looking for a way to attach multiple subscribers to an RxJava Observable stream, with each subscriber processing emitted events asynchronously. I first tried using .flatMap() but that didn't seem to work on any subsequent subscribers. All subscribers were processing events on the same thread. .flatMap(s -> Observable.just(s).subscribeOn(Schedulers.newThread())) What ended up working was consuming each event in a new thread by creating a new Observable each time: Observable.from(Arrays