Implementing an Event Bus with RxJava - RxBus - Wedding Party
7 plus ones
Shared publicly•View activity
- Hellonice article. I was trying the eventbus but i need to enforse the subscribeOn and observeOn stuff so that when i call onNext no matter what thread i'm currently calling .send on...
Do you think it would be possible?May 1, 2015
- heycould you expand a little more on what you mean by "enforcing the subscribeOn and observeOn" ? do you want to enforce the actions of your onNext in a certain thread? or do you want to enforce what happens in subsribeOn (i.e. the observer) on a certain thread?May 4, 2015
- No matter where i post my events i want to enforce The receiver to receive it on a specific threadMay 4, 2015
- typically i would do something like an `observeOn(AndroidSchedulers.mainThread)` on the bus receiving side, as along as this doesn't have to happen in the observer. that way it will always be picked up on the main thread (or any other thread you say you want to observeOn). that's one possibility (if i'm understanding your requirement correctly)Jun 17, 2015
- There's this another article https://lorentzos.com/rxjava-as-event-bus-the-right-way-10a36bdd49ba
about using RxJava as event bus but uses a different approach. What's your opinion on this?Jun 24, 2016
Add a comment...