Date emissions in Streams are affected by the backpressure operations used to extract the data. Let us define some backpressure operations by doing the following steps:
- Create a separate service class, EmployeeBatchStreamservice that will showcase some abstract methods that will utilize time-related operators that are needed in setting up backpressure on Stream types:
public interface EmployeeBatchStreamservice { public Mono<Employee> selectOneEmployee(); public Flux<Employee> selectSomeEmpRecords(); public Flux<List<Employee>> getEmployeesByBatch(); public Flux<String> getTimedFirstNames(); public Flux<Employee> selectEmpDelayed(); public Flux<Employee> getDeferredEmployees(); }
- The first event to implement is selectOneEmployee() ...