Applying backpressure to Mono<T> and Flux<T>

Retrieving elements from array or Collection is different from data retrieval in Mono<T> or Flux<T>. In a typical data retrieval operation, the control of data emission depends on whether subscribers will pull it or not. The process can be very fast when a number of elements is practically manageable but dangerously slow when data abruptly increases. Once the subscriber or receiver becomes overwhelmed with the volume of data emission, some parts of the application may starve and will lead to memory leak. Backpressure is the process of controlling the flow of the data Stream to avoid an overflow of data emission between fast Publisher<T> and slow Subscriber<T>. It aims to maintain an optimal performance of any Reactive events even in worst-case scenarios.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.135.183.138