New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can make ParalleFlux.subscribe(CoreSubscriber<? super T>[])
public?
#2328
Comments
It is protected though. Couldn't you create a wrapper by inheriting from |
Thanks for the reply! class ParallelFluxWrapper extends ParallelFlux<Object> {
private final ParallelFlux<Object> source;
ContextAwareParallelFlux(ParallelFlux<Object> source, ...) {
this.source = source;
...
}
...
@Override
protected void subscribe(CoreSubscriber<? super Object>[] subscribers) {
// Can't just do this because the method is not public.
source.subscribe(subscribers);
}
} However, I can't just delegate |
Motivation: We have hooks for `RxJava` which automatically propagate `RequestContext`. But we don't have one for Reactor. Modifications: - Add `RequestContextHooks.enable()` to enable propagating `RequestContext` automatically. Result: - You can now enable automatic `RequestContext` propatation during Reactor operations. To-do: - `ParallelFlux` is not supported at the moment. See reactor/reactor-core#2328
Motivation: We have hooks for `RxJava` which automatically propagate `RequestContext`. But we don't have one for Reactor. Modifications: - Add `RequestContextHooks.enable()` to enable propagating `RequestContext` automatically. Result: - You can now enable automatic `RequestContext` propatation during Reactor operations. To-do: - `ParallelFlux` is not supported at the moment. See reactor/reactor-core#2328
Motivation: We have hooks for `RxJava` which automatically propagates `RequestContext`. But we don't have one for Reactor. Modifications: - Add `RequestContextHooks.enable()` to enable propagating `RequestContext` automatically. - Reactor 3.3.8.RELEASE -> 3.3.9.RELEASE Result: - You can now enable automatic `RequestContext` propagation during Reactor operations. To-do: - `ParallelFlux` is not supported at the moment. See reactor/reactor-core#2328
This commit switches the `subscribe(CoreSubscriber[])` method from protected to public, in order to allow overloading methods to delegate to any existing `ParallelFlux`.
Thank you! |
Motivation
Hello! 馃槃
I'm making hooks that propagate thread-local contexts in our framework during the Reactor operations.
We already have a one for RxJava, but not for Reactor.
I have almost implemented the hooks for
Flux
andMono
, but I couldn't do it forParallelFlux
.It's because I couldn't just delegate this method to the original
ParallelFlux
.https://github.com/reactor/reactor-core/blob/v3.4.0-M2/reactor-core/src/main/java/reactor/core/publisher/ParallelFlux.java#L954
Is there any chance that we can make this method as public, please?
Desired solution
Make
ParalleFlux.subscribe(CoreSubscriber<? super T>[])
public.The text was updated successfully, but these errors were encountered: