Top Deprecated
Reactor Core 3.6.0

Deprecated API


No API in this release is deprecated for removal.

Deprecated Item Summary

SinceDeprecated Item and Description
reactor.core.publisher.DirectInnerContainer<T>

remove again once DirectProcessor is removed

reactor.core.publisher.DirectProcessor<
the input and output value type
T
>

To be removed in 3.5, prefer clear cut usage of Sinks. Closest sink is Sinks.many().multicast().directBestEffort(), except it doesn't terminate overflowing downstreams.

Returns:

a fresh processor
reactor.core.publisher.DirectProcessor.create
()

To be removed in 3.5. Closest sink is Sinks.many().multicast().directBestEffort(), except it doesn't terminate overflowing downstreams.

reactor.core.publisher.EmitterProcessor<
the input and output value type
T
>

To be removed in 3.5. Prefer clear cut usage of Sinks through variations of Sinks.many().multicast().onBackpressureBuffer(). If you really need the subscribe-to-upstream functionality of a org.reactivestreams.Processor, switch to Sinks.ManyWithUpstream with Sinks#unsafe() variants of Sinks.unsafe().manyWithUpstream().

This processor was blocking in EmitterProcessor#onNext(Object). This behaviour can be implemented with the Sinks API by calling Sinks.Many#tryEmitNext(Object) and retrying, e.g.:

while (sink.tryEmitNext(v).hasFailed()) {
    LockSupport.parkNanos(10);
}
reactor.core.publisher.EmitterProcessor.EmitterDisposable.EmitterDisposable(EmitterProcessor<?> emitterProcessor)

Deprecated as a consequence of EmitterProcessor being deprecated. See corresponding docs for further information.

reactor.core.publisher.EmitterProcessor.EmitterDisposable.target

Deprecated as a consequence of EmitterProcessor being deprecated. See corresponding docs for further information.

reactor.core.publisher.EmitterProcessor.EmitterInner.EmitterInner(CoreSubscriber<? super T> actual, EmitterProcessor<T> parent)

Deprecated as a consequence of EmitterProcessor being deprecated. See corresponding docs for further information.

reactor.core.publisher.EmitterProcessor.EmitterInner.parent

Deprecated as a consequence of EmitterProcessor being deprecated. See corresponding docs for further information.

Returns:

a fresh processor
reactor.core.publisher.EmitterProcessor.create
()

use Sinks.many().multicast().onBackpressureBuffer() (or the unsafe variant if you're sure about external synchronization). To be removed in 3.5.

Returns:

a fresh processor
reactor.core.publisher.EmitterProcessor.create
(boolean
automatically cancel
autoCancel
)

use Sinks.many().multicast().onBackpressureBuffer(bufferSize, boolean) using the old default of Queues#SMALL_BUFFER_SIZE for the bufferSize (or the unsafe variant if you're sure about external synchronization). To be removed in 3.5.

Returns:

a fresh processor
reactor.core.publisher.EmitterProcessor.create
(int
the internal buffer size to hold signals
bufferSize
)

use Sinks.many().multicast().onBackpressureBuffer(bufferSize) (or the unsafe variant if you're sure about external synchronization). To be removed in 3.5.

Returns:

a fresh processor
reactor.core.publisher.EmitterProcessor.create
(int
the internal buffer size to hold signals
bufferSize
,
boolean
automatically cancel
autoCancel
)

use Sinks.many().multicast().onBackpressureBuffer(bufferSize, autoCancel) (or the unsafe variant if you're sure about external synchronization). To be removed in 3.5.

Returns:

a new Flux behaving like the fastest of its sources
reactor.core.publisher.Flux.first
(Publisher<? extends I>...
The competing source publishers
sources
)

use firstWithSignal(Publisher[]). To be removed in reactor 3.5.

Returns:

a new Flux behaving like the fastest of its sources
reactor.core.publisher.Flux.first
(Iterable<? extends Publisher<? extends I>>
The competing source publishers
sources
)

use firstWithSignal(Iterable). To be removed in reactor 3.5.

Returns:

a Flux of n elements from the source, that requests AT MOST n from upstream in total.
reactor.core.publisher.Flux.limitRequest
(long
the number of elements to emit from this flux, which is also the backpressure cap for all of downstream's request
n
)

replace with take(n, true) in 3.4.x, then take(long) in 3.5.0. To be removed in 3.6.0 at the earliest. See https://github.com/reactor/reactor-core/issues/2339

Returns:

a merged Flux that compares latest values from each source, using the smallest value and replenishing the source that produced it
reactor.core.publisher.Flux.mergeOrdered
(Publisher<? extends I>...
Publisher sources of Comparable to merge
sources
)

Use mergeComparingDelayError(int, Comparator, Publisher[]) instead (as mergeComparing(Publisher[]) don't have this operator's delayError behavior). To be removed in 3.6.0 at the earliest.

Returns:

a merged Flux that compares latest values from each source, using the smallest value and replenishing the source that produced it
reactor.core.publisher.Flux.mergeOrdered
(Comparator<? super T>
the Comparator to use to find the smallest value
comparator
,
Publisher<? extends T>...
Publisher sources to merge
sources
)

Use mergeComparingDelayError(int, Comparator, Publisher[]) instead (as mergeComparing(Publisher[]) don't have this operator's delayError behavior). To be removed in 3.6.0 at the earliest.

Returns:

a merged Flux that compares latest values from each source, using the smallest value and replenishing the source that produced it
reactor.core.publisher.Flux.mergeOrdered
(int
the number of elements to prefetch from each source (avoiding too many small requests to the source when picking)
prefetch
,
Comparator<? super T>
the Comparator to use to find the smallest value
comparator
,
Publisher<? extends T>...
Publisher sources to merge
sources
)

Use mergeComparingDelayError(int, Comparator, Publisher[]) instead (as mergeComparing(Publisher[]) don't have this operator's delayError behavior). To be removed in 3.6.0 at the earliest.

Returns:

a new Flux that compares latest values from the given publisher and this flux, using the smallest value and replenishing the source that produced it
reactor.core.publisher.Flux.mergeOrderedWith
(Publisher<? extends T>
the Publisher to merge with
other
,
Comparator<? super T>
the Comparator to use for merging
otherComparator
)

Use mergeComparingWith(Publisher, Comparator) instead (with the caveat that it defaults to NOT delaying errors, unlike this operator). To be removed in 3.6.0 at the earliest.

Returns:

an instrumented Flux
reactor.core.publisher.Flux.metrics
()

Prefer using the tap(SignalListenerFactory) with the SignalListenerFactory provided by the new reactor-core-micrometer module. To be removed in 3.6.0 at the earliest.

Returns:

a new Mono
reactor.core.publisher.Flux.publishNext
()

use shareNext() instead, or use `publish().next()` if you need to `connect(). To be removed in 3.5.0

Returns:

a new Disposable that can be used to cancel the underlying Subscription
reactor.core.publisher.Flux.subscribe
(Consumer<? super T>
the consumer to invoke on each value
consumer
,
Consumer<? super Throwable>
the consumer to invoke on error signal
errorConsumer
,
Runnable
the consumer to invoke on complete signal
completeConsumer
,
Consumer<? super Subscription>
the consumer to invoke on subscribe signal, to be used for the initial request, or null for max request
subscriptionConsumer
)

Because users tend to forget to request the subsciption. If the behavior is really needed, consider using subscribeWith(Subscriber). To be removed in 3.5.

Returns:

a new Flux that emits values from an alternative Publisher for each source onNext
reactor.core.publisher.Flux.switchMap
(Function<? super T, Publisher<? extends V>>
the Function to generate a Publisher for each source value
fn
,
int
the produced demand for inner sources
prefetch
)

to be removed in 3.6.0 at the earliest. In 3.5.0, you should replace calls with prefetch=0 with calls to switchMap(fn), as the default behavior of the single-parameter variant will then change to prefetch=0.

Returns:

a SinkManyAbstractBase accepting publishers and producing T
reactor.core.publisher.Flux.switchOnNext
(Publisher<? extends Publisher<? extends T>>
The Publisher of Publisher to switch on and mirror.
mergedPublishers
,
int
the inner source request size
prefetch
)

to be removed in 3.6.0 at the earliest. In 3.5.0, you should replace calls with prefetch=0 with calls to switchOnNext(mergedPublishers), as the default behavior of the single-parameter variant will then change to prefetch=0.

reactor.core.publisher.FluxProcessor<
the input value type
IN
,
the output value type
OUT
>

Processors will be removed in 3.5. Prefer using Many instead, or see https://github.com/reactor/reactor-core/issues/2431 for alternatives

Returns:

a serializing FluxProcessor
reactor.core.publisher.FluxProcessor.serialize
()

Deprecated as a consequence of FluxProcessor being deprecated. See corresponding docs for further information.

Returns:

a serializing FluxSink
reactor.core.publisher.FluxProcessor.sink
()

To be removed in 3.5, prefer clear cut usage of Sinks through the Sinks#many() spec.

Returns:

a serializing FluxSink
reactor.core.publisher.FluxProcessor.sink
(FluxSink.OverflowStrategy
the overflow strategy, see FluxSink.OverflowStrategy for the available strategies
strategy
)

To be removed in 3.5, prefer clear cut usage of Sinks through the Sinks#many() spec.

Returns:

a FluxProcessor accepting publishers and producing T
reactor.core.publisher.FluxProcessor.switchOnNext
()

should use Sinks, Many#asFlux() and Flux#switchOnNext(Publisher). To be removed in 3.5.0.

Returns:

a new blackboxed FluxProcessor
reactor.core.publisher.FluxProcessor.wrap
(final Subscriber<IN>
the upstream subscriber
upstream
,
final Publisher<OUT>
the downstream publisher
downstream
)

Deprecated as a consequence of FluxProcessor being deprecated. See corresponding docs for further information.

reactor.core.publisher.FluxSink.currentContext()

To be removed in 3.6.0 at the earliest. Prefer using #contextView() instead.

reactor.core.publisher.Hooks.addCallSiteInfo(P publisher, String callSite)

Should only be used by the instrumentation, DOES NOT guarantee any compatibility

reactor.core.publisher.Hooks.addReturnInfo(P publisher, String method)

Should only be used by the instrumentation, DOES NOT guarantee any compatibility

Returns:

a new Mono behaving like the fastest of its sources.
reactor.core.publisher.Mono.first
(Mono<? extends T>...
The deferred monos to use.
monos
)

use firstWithSignal(Mono[]). To be removed in reactor 3.5.

Returns:

a new Mono behaving like the fastest of its sources.
reactor.core.publisher.Mono.first
(Iterable<? extends Mono<? extends T>>
The deferred monos to use.
monos
)

use firstWithSignal(Iterable). To be removed in reactor 3.5.

Returns:

an instrumented Mono
reactor.core.publisher.Mono.metrics
()

Prefer using the tap(SignalListenerFactory) with the SignalListenerFactory provided by the new reactor-core-micrometer module. To be removed in 3.6.0 at the earliest.

reactor.core.publisher.MonoCurrentContext.INSTANCE

Deprecated as a consequence of MonoCurrentContext being deprecated. See corresponding docs for further information.

reactor.core.publisher.MonoProcessor<
the type of the value that will be made available
O
>

Processors will be removed in 3.5. Prefer using Sinks.One or Sinks.Empty instead, or see https://github.com/reactor/reactor-core/issues/2431 for alternatives

Returns:

true if this MonoProcessor is cancelled, false otherwise.
reactor.core.publisher.MonoProcessor.isCancelled
()

the MonoProcessor will cease to implement Subscription and this method will be removed in 3.5

Returns:

the value that completed the MonoProcessor, or null if it has not been completed
reactor.core.publisher.MonoProcessor.peek
()

this method is discouraged, consider peeking into a MonoProcessor by turning it into a CompletableFuture

reactor.core.publisher.MonoProcessor.request(long
the request amount
n
)

the MonoProcessor will cease to implement Subscription in 3.5

reactor.core.publisher.MonoSink.currentContext()

To be removed in 3.6.0 at the earliest. Prefer using #contextView() instead.

reactor.core.publisher.NextProcessor<O>

Deprecated as a consequence of MonoProcessor being deprecated.

reactor.core.publisher.NextProcessor.NextInner.NextInner(CoreSubscriber<? super T> actual, NextProcessor<T> parent)

Deprecated as a consequence of NextProcessor being deprecated. See corresponding docs for further information.

reactor.core.publisher.NextProcessor.NextInner.parent

Deprecated as a consequence of NextProcessor being deprecated. See corresponding docs for further information.

reactor.core.publisher.ReplayProcessor<
the value type
T
>

To be removed in 3.5, prefer clear cut usage of Sinks through variations under Sinks.many().replay().

reactor.core.publisher.ReplayProcessor.ReplayInner.ReplayInner(CoreSubscriber<? super T> actual, ReplayProcessor<T> parent)

Deprecated as a consequence of ReplayProcessor being deprecated. See corresponding docs for further information.

reactor.core.publisher.ReplayProcessor.ReplayInner.parent

Deprecated as a consequence of ReplayProcessor being deprecated. See corresponding docs for further information.

Returns:

a new ReplayProcessor that replays its last pushed element to each new Subscriber
reactor.core.publisher.ReplayProcessor.cacheLast
()

use Sinks.many().replay().latest() (or the unsafe variant if you're sure about external synchronization). To be removed in 3.5.

Returns:

a new ReplayProcessor that replays its last pushed element to each new Subscriber, or a default one if nothing was pushed yet
reactor.core.publisher.ReplayProcessor.cacheLastOrDefault
(T
a default value to start the sequence with in case nothing has been cached yet.
value
)

use Sinks.many().replay().latestOrDefault(value) (or the unsafe variant if you're sure about external synchronization). To be removed in 3.5.

Returns:

a new ReplayProcessor that replays the whole history to each new Subscriber.
reactor.core.publisher.ReplayProcessor.create
()

use Sinks.many().replay().all() (or the unsafe variant if you're sure about external synchronization). To be removed in 3.5.

Returns:

a new ReplayProcessor that replays a limited history to each new Subscriber.
reactor.core.publisher.ReplayProcessor.create
(int
the backlog size, ie. maximum items retained for replay.
historySize
)

use Sinks.many().replay().limit(historySize) (or the unsafe variant if you're sure about external synchronization). To be removed in 3.5.

Returns:

a new ReplayProcessor that replays the whole history to each new Subscriber if configured as unbounded, a limited history otherwise.
reactor.core.publisher.ReplayProcessor.create
(int
maximum items retained if bounded, or initial link size if unbounded
historySize
,
boolean
true if "unlimited" data store must be supplied
unbounded
)

use Sinks.many().replay().limit(historySize) for bounded cases (unbounded == false) or Sinks.many().replay().all(bufferSize) otherwise (or the unsafe variant if you're sure about external synchronization). To be removed in 3.5.

Returns:

a new ReplayProcessor that replay up to size elements, but will evict them from its history based on their age.
reactor.core.publisher.ReplayProcessor.createSizeAndTimeout
(int
the maximum number of buffered items
size
,
Duration
the maximum age of the contained items
maxAge
)

use Sinks.many().replay().limit(size, maxAge) (or the unsafe variant if you're sure about external synchronization). To be removed in 3.5.

Returns:

a new ReplayProcessor that replay up to size elements, but will evict them from its history based on their age.
reactor.core.publisher.ReplayProcessor.createSizeAndTimeout
(int
the maximum number of buffered items
size
,
Duration
the maximum age of the contained items in milliseconds
maxAge
,
Scheduler
the Scheduler that provides the current time
scheduler
)

use Sinks.many().replay().limit(size, maxAge, scheduler) (or the unsafe variant if you're sure about external synchronization). To be removed in 3.5.

Returns:

a new ReplayProcessor that replays elements based on their age.
reactor.core.publisher.ReplayProcessor.createTimeout
(Duration
the maximum age of the contained items
maxAge
)

use Sinks.many().replay().limit(maxAge) (or the unsafe variant if you're sure about external synchronization). To be removed in 3.5.

Returns:

a new ReplayProcessor that replays elements based on their age.
reactor.core.publisher.ReplayProcessor.createTimeout
(Duration
the maximum age of the contained items
maxAge
,
Scheduler scheduler)

use Sinks.many().replay().limit(maxAge, scheduler) (or the unsafe variant if you're sure about external synchronization). To be removed in 3.5.

reactor.core.publisher.SinkManyBestEffort<T>

Deprecated as a consequence of DirectInnerContainer being deprecated.

reactor.core.publisher.SinkManyBestEffort.DirectInner.DirectInner(CoreSubscriber<? super T> actual, DirectInnerContainer<T> parent)

Deprecated as a consequence of DirectInnerContainer being deprecated. See corresponding docs for further information.

reactor.core.publisher.SinkManyBestEffort.DirectInner.parent

Deprecated as a consequence of DirectInnerContainer being deprecated. See corresponding docs for further information.

reactor.core.publisher.SinkManyBestEffort.createAllOrNothing()

Deprecated as a consequence of SinkManyBestEffort being deprecated. See corresponding docs for further information.

reactor.core.publisher.SinkManyBestEffort.createBestEffort()

Deprecated as a consequence of SinkManyBestEffort being deprecated. See corresponding docs for further information.

Returns:

the current subscriber Context.
reactor.core.publisher.SynchronousSink.currentContext
()

To be removed in 3.6.0 at the earliest. Prefer using #contextView() instead.

reactor.core.publisher.UnicastProcessor<
the input and output type
T
>

to be removed in 3.5, prefer clear cut usage of Sinks through variations under Sinks.many().unicast().

Returns:

a unicast FluxProcessor
reactor.core.publisher.UnicastProcessor.create
()

use Sinks.many().unicast().onBackpressureBuffer() (or the unsafe variant if you're sure about external synchronization). To be removed in 3.5.

Returns:

a unicast FluxProcessor
reactor.core.publisher.UnicastProcessor.create
(Queue<E>
the buffering queue
queue
)

use Sinks.many().unicast().onBackpressureBuffer(queue) (or the unsafe variant if you're sure about external synchronization). To be removed in 3.5.

Returns:

a unicast FluxProcessor
reactor.core.publisher.UnicastProcessor.create
(Queue<E>
the buffering queue
queue
,
Disposable
called on any terminal signal
endcallback
)

use Sinks.many().unicast().onBackpressureBuffer(queue, endCallback) (or the unsafe variant if you're sure about external synchronization). To be removed in 3.5.

Returns:

a unicast FluxProcessor
reactor.core.publisher.UnicastProcessor.create
(Queue<E>
the buffering queue
queue
,
Consumer<? super E>
called when queue.offer return false and unicastProcessor is about to emit onError.
onOverflow
,
Disposable
called on any terminal signal
endcallback
)

use Sinks.many().unicast().onBackpressureBuffer(queue, endCallback) (or the unsafe variant if you're sure about external synchronization). The onOverflow callback is not supported anymore. To be removed in 3.5.

reactor.core.scheduler.Scheduler.start()

Use init() instead. The use of this method is discouraged. Some implementations allowed restarting a Scheduler, while others did not. One of the issues with restarting is that checking the disposed state is unreliable in concurrent scenarios.

reactor.core.scheduler.Schedulers.disableMetrics()

prefer using Micrometer#timedScheduler from the reactor-core-micrometer module. To be removed at the earliest in 3.6.0.

reactor.core.scheduler.Schedulers.enableMetrics()

prefer using Micrometer#timedScheduler from the reactor-core-micrometer module. To be removed at the earliest in 3.6.0.

reactor.util.Metrics

prefer using the new reactor-core-micrometer module Micrometer entrypoint. To be removed in 3.6.0 at the earliest.

reactor.util.Metrics.MicrometerConfiguration

Prefer using the reactor-core-micrometer module and configuring it using the Micrometer entrypoint.

Returns:

the configured registry
reactor.util.Metrics.MicrometerConfiguration.getRegistry
()

prefer using Micrometer setup in new reactor-core-micrometer module. To be removed at the earliest in 3.6.0.

Returns:

the previously configured registry.
reactor.util.Metrics.MicrometerConfiguration.useRegistry
(io.micrometer.core.instrument.MeterRegistry registry)

prefer using Micrometer setup in new reactor-core-micrometer module. To be removed at the earliest in 3.6.0.

Returns:

true if the Micrometer instrumentation facade is available
reactor.util.Metrics.isInstrumentationAvailable
()

prefer explicit usage of the reactor-core-micrometer module. To be removed in 3.6.0 at the earliest.

Returns:

a new Context with a merge of the entries from this context and the given context.
reactor.util.context.Context.putAll
(Context
the Context from which to copy entries
context
)

will be removed in 3.5, kept for backward compatibility with 3.3. Until then if you need to work around the deprecation, use putAll(ContextView) combined with readOnly()