Class UnicastProcessor<T>

java.lang.Object
reactor.core.publisher.Flux<T>
reactor.core.publisher.FluxProcessor<T,T>
reactor.core.publisher.UnicastProcessor<T>
Type Parameters:
T - the input and output type
All Implemented Interfaces:
Iterable<T>, Collection<T>, Queue<T>, Processor<T,T>, Publisher<T>, Subscriber<T>, Subscription, CorePublisher<T>, CoreSubscriber<T>, Disposable, Fuseable, Fuseable.QueueSubscription<T>, Sinks.Many<T>, Scannable

@Deprecated public final class UnicastProcessor<T> extends FluxProcessor<T,T> implements Fuseable.QueueSubscription<T>, Fuseable
Deprecated.
to be removed in 3.5, prefer clear cut usage of Sinks through variations under Sinks.many().unicast().
A Processor implementation that takes a custom queue and allows only a single subscriber. UnicastProcessor allows multiplexing of the events which means that it supports multiple producers and only one consumer. However, it should be noticed that multi-producer case is only valid if appropriate Queue is provided. Otherwise, it could break Reactive Streams Spec if Publishers publish on different threads.



Note: UnicastProcessor does not respect the actual subscriber's demand as it is described in Reactive Streams Spec. However, UnicastProcessor embraces configurable Queue internally which allows enabling backpressure support and preventing of consumer's overwhelming. Hence, interaction model between producers and UnicastProcessor will be PUSH only. In opposite, interaction model between UnicastProcessor and consumer will be PUSH-PULL as defined in Reactive Streams Spec. In the case when upstream's signals overflow the bound of internal Queue, UnicastProcessor will fail with signaling onError( reactor.core.Exceptions.OverflowException).



Note: The implementation keeps the order of signals. That means that in case of terminal signal (completion or error signals) it will be postponed until all of the previous signals has been consumed.