Chapter 7: Flow Control and Backpressure

  1. Why do we need the groupBy operator?

The groupBy() operator converts Flux<T> into batches. The operator associates a key with each element of Flux<T>. It then groups elements that have the same key. These groups are then emitted by the operator. 

  1. What is the difference between the groupBy and buffer operators?

The groupBy operator groups the stream of events based on a configured key, but the buffer operator splits the stream into chunks of a specified size. Thus, the buffer operator maintains the original ordering of events.

  1. How can we throttle an event in Reactor?

The sample() operator allows us to accomplish throttling.

  1. What is the difference between the Overflow.Ignore and the OverFlow.Latest ...

Get Hands-On Reactive Programming with Reactor now with O’Reilly online learning.

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