Reactor provides the replay operator to convert a Flux to a ConnectableFlux. The resulting ConnectableFlux keeps buffering events published to the first subscriber. The buffer can be configured to keep the last n entries, or it can be configured to be based on the time duration. Only the buffered events are replayed back to the subscribers.
Refer to the following diagram:
A ConnectableFlux must be subscribed by n subscribers before it starts to publish events. ConnectableFlux provides the following operators to manage subscribers:
- Connect: The connect operator must be invoked after enough subscriptions have been made. ...