Skip to content
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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LoadBalancedRSocketMono (LatencySubscriber) does not seem to propagate subscriber context properly #822

Closed
a701440 opened this issue May 7, 2020 · 0 comments · Fixed by #953
Labels
Milestone

Comments

@a701440
Copy link

a701440 commented May 7, 2020

I am trying to pass additional information in subscriber context through the LoadBalancedRSocketMono to my implementation of RSocket. It seems like LoadBalancedRSocketMono does not properly propagate it up the subscription chain.

After debugging it for a bit it looks like subscriber context is present as expected on the
LatencySubscriber child argument. (child.currentContext() has the data), but then it's lost when subscribing to the source.

LB.getRSocket().flatMap(rsocket -> {
       return rsocket.requestResponse(request).subscriberContext(resultsSink.currentContext());
    })

In this case rsocket is the WeightedRSocket from the LB. I see that resultsSink.currentContext() has correct data, but when the call arrives to the actual RSocket wrapped in the WeightedRSocket in a function like this:

@Override
public Mono<Payload> requestResponse(Payload payload) {
    return delegate.requestResponse(payload).subscriberContext(ctx -> {
        // expecting that higher level subscriber context data would be available here...
        // same problem exists when using Mono.subscriberContext()...
        return ctx;
   });
}

I see that ctx is empty and is missing the data that was provided to the WeightedRSocket.
It appears that as LB is creating the handler chain the context is not properly propagated at some point.

@a701440 a701440 changed the title LoadBalancedRSocketMono does not seem to propagate subscriber context properly LoadBalancedRSocketMono (LatencySubscriber) does not seem to propagate subscriber context properly May 7, 2020
@OlegDokuka OlegDokuka added this to the 1.1 M2 milestone Aug 12, 2020
@OlegDokuka OlegDokuka added the bug label Aug 12, 2020
@OlegDokuka OlegDokuka modified the milestones: 1.1 M2, 1.1 RC1 Sep 14, 2020
@rstoyanchev rstoyanchev modified the milestones: 1.1 RC1, 1.1.0 Oct 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants