This post has three parts:
- quick primer on what an event bus is
- implementing the event bus with RxJava
- parting thoughts on this approach
“RxBus” is not going to be a library. Implementing an event bus with RxJava is so ridiculously easy that it doesn’t warrant the bloat of an independent library.
Part 1: What is an event bus?
#
Let’s talk about two concepts that seem similar: the Observer pattern and the Pub-sub pattern.