Example project

In the following example, we will show the usage of RxJava in the real-time processing of the temperature received from multiple sensors. The sensor data is provided (randomly generated) by a Spring Boot server. The server is configured to accept the sensor name as a configuration so that we may change it for each instance. We'll start five instances and display warnings on the client side if one of the sensors outputs more than 80 degrees Celsius.

Starting multiple sensors is easily done from bash with the following command:

The server-side code is simple, we have only one REST controller configured to output the sensor data ...

Get Design Patterns and Best Practices in Java now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.