Managing continuous data emission
All the Streams generated by the previous recipes need to be subscribed in order to emit data Streams. This kind of data Stream is called the cold stream. Many of the real-time applications nowadays need services that emit a data Stream continuously once the server starts even without any subscription. Thus, data emission in this recipe is not bounded by any subscribers which gives each subscriber a different set of Streams every now and then within such a period. This recipe will discuss snippets that implement synchronous and non-blocking Stream operations.
Getting ready
This chapter will be using ch07
again to implement services that use ConnectableFlux<T>
and Processor<T>
.
How to do it...
This will be the first recipe that will implement a continuous stream:
- Let us create a service class
EmployeeHotStreamservice
that contains the following template methods:
public interface EmployeeHotStreamservice { public ConnectableFlux<String> freeFlowEmps...