EmitterProcessor is a processor that can be used with several subscribers. Multiple subscribers can ask for the next value event, based on their individual rate of consumption. The processor provides the necessary backpressure support for each subscriber. This is depicted in the following diagram:
The processor is also capable of publishing events from an external publisher. It consumes an event from the injected publisher and synchronously passes it to the subscribers.
Let's look at the following code:
EmitterProcessor<Long> data = EmitterProcessor.create(1);data.subscribe(t -> System.out.println(t));FluxSink<Long> ...