Class BroadcastProcessor<T>

java.lang.Object
io.smallrye.mutiny.operators.AbstractMulti<T>
io.smallrye.mutiny.operators.multi.processors.BroadcastProcessor<T>
All Implemented Interfaces:
Multi<T>, Flow.Processor<T,T>, Flow.Publisher<T>, Flow.Subscriber<T>

public class BroadcastProcessor<T> extends AbstractMulti<T> implements Flow.Processor<T,T>
Implementation of Flow.Processor that broadcast all subsequently observed items to its current Flow.Subscribers.

This processor does not coordinate back-pressure between different subscribers and between the upstream source and a subscriber. If an upstream item is received via onNext(Object), if a subscriber is not ready to receive that item, that subscriber is terminated via a BackPressureFailure.

The BroadcastProcessor's Flow.Subscriber-side consumes items in an unbounded manner.

When this BroadcastProcessor is terminated via onError(Throwable) or onComplete(), late Flow.Subscribers only receive the respective terminal event.

Unlike the UnicastProcessor, a BroadcastProcessor doesn't retain/cache items, therefore, a new Subscriber won't receive any past items.

Even though BroadcastProcessor implements the Flow.Subscriber interface, calling onSubscribe is not required if the processor is used as a standalone source. However, calling onSubscribe after the BroadcastProcessor has failed or reached completion results in the given Flow.Subscription being canceled immediately.