Spring 5.0 Projects
上QQ阅读APP看书,第一时间看更新

Push-pull mechanism

Project Reactor has good assistance for proving a push/pull feature. There are practical scenarios where consumers intake the data at a slower rate than the producer emits them. In this case, the producer will raise the event and wait for Observers to pull it. In some situations, the consumer works faster than the producer. To handle it, consumers wait for the events to be pushed from the producer side. Project Reactor enables this flow to be dynamic in nature whenever necessary. It will be controlled by the rate of production and consumption.