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 refresh problem after new Collection<RSocketSupplier> #634

Closed
linux-china opened this issue May 16, 2019 · 4 comments

Comments

@linux-china
Copy link
Contributor

linux-china commented May 16, 2019

Steps as following:

  • create a rsocketSupplierProcessor with initial RSocket cluster information
  • create LoadBalancedRSocketMono from rsocketSupplierProcessor
  • invoke rsocketSupplierProcessor.onNext() to update RSocket cluster information

LoadBalancedRSocketMono will not work after cluster information updated. Maybe refreshSockets() not invoked after cluster updated.

        // rsocket cluster
        List<String> uriList1 = Arrays.asList("tcp://127.0.0.1:42252");
        ReplayProcessor<List<RSocketSupplier>> rsocketSupplierProcessor = ReplayProcessor.cacheLast();
        rsocketSupplierProcessor.onNext(uriList1.stream().map(uri -> new RSocketSupplier(() -> rSocket(uri))).collect(Collectors.toList()));
        LoadBalancedRSocketMono rSocketMono = LoadBalancedRSocketMono.create(rsocketSupplierProcessor);
        //update rsocket cluster,  the update logic in io.rsocket.client.RSocketSupplierPool.handleNewFactories
        // handleNewFactories does not invoke io.rsocket.client.LoadBalancedRSocketMono.refreshSockets();
        List<String> uriList2 = Arrays.asList("tcp://localhost:42252");
        rsocketSupplierProcessor.onNext(uriList2.stream().map(uri -> new RSocketSupplier(() -> rSocket(uri))).collect(Collectors.toList()));
       
@linux-china linux-china changed the title LoadBalancedRSocketMono refresh problem after Collection<RSocketSupplier> updated LoadBalancedRSocketMono refresh problem after new Collection<RSocketSupplier> May 16, 2019
@robertroeser
Copy link
Member

Is this a duplicate of #633 ?

@jareddellitt
Copy link
Contributor

jareddellitt commented May 21, 2019

I think this is the same thing I addressed in #623. Any chance a new RC will be published soon with the fix?

@robertroeser
Copy link
Member

@jareddellitt @linux-china 0.12.2-RC3 is out

@linux-china
Copy link
Contributor Author

@robertroeser yes, it works for me with 0.12.2-RC3 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants