For some time have been using create
an EmitterProcessor
with built in sink
as follows:
EmitterProcessor<String> emitter = EmitterProcessor.create();
FluxSink<String> sink = emitter.sink(FluxSink.OverflowStrategy.LATEST);
The sink
publishes using a Flux
.from
command
Flux<String> out = Flux
.from(emitter
.log(log.getName()));
and the sink
can be passed around, and populated with strings, simply using the next
instruction.
Now we see that EmitterProcessor
is deprecated.
It's all replaced with Sinks.many()
like this
Many<String> sink = Sinks.many().unicast().onBackpressureBuffer();
but how to use that to publish from
?