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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.