Reactive Java or RxJava is an implementation and enhancement of the observer pattern. It was intended for use in event driven schemes where nesting synchronous or asynchronous callback methods becomes overly complex. This example builds on the basics described in Part One of this topic, https://examples.javacodegeeks.com/core-java/reactive-java-rxjava-tutorial-introduction, if you are not familiar with the basics please look back at this previous article before moving forward with these more advanced concepts.  We will examine asynchronous or concurrency use cases that are made easier with RxJava.  The concurrency problems that RxJava is suitable to solve and we will look at in this example include:

- Nested callbacks
- Handler exceptions on asynchronous calls
- Aggregating or combining asynchronouse calls

Lets start with a look at a simple asynchronous call in RxJava.


Now lets take a look at an asynchronous example with an emitted value.


Next lets take a look at an asychronous call to an API.


To build on this we will make multiple API calls and zip the results


In this next example we will zip and map the results of multiple API calls.


Finally lets examine streaming the results of asynchronous API calls where the results are emitted as they are available.







