While looking at the source code of the WiretapConnector
from Spring framework I stumbled upon an object of type MonoProcessor
. I tried Googling explanations of uses for it but to no avail.
Javadoc doesn't say much to a Reactive/Reactor layperson:
A
MonoProcessor
is a Mono extension that implements stateful semantics. Multi-subscribe is allowed. Once aMonoProcessor
has been resolved, newer subscribers will benefit from the cached result.
This last sentence hints that the result of calculation is cached and it seems this to be the use of MonoProcessor
in this code.
Could someone clarify what would be the intended use-case of MonoProcessor
and why was it introduced in the first place?