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

ReactorNettyTcpClient constructor with callback to initialize TcpClient [SPR-17523] #22055

spring-issuemaster opened this Issue Nov 20, 2018 · 1 comment


None yet
2 participants
Copy link

spring-issuemaster commented Nov 20, 2018

Gabriel Dogaru opened SPR-17523 and commented

This is the same issue as #17057

The solution there does not apply anymore because that constructor was removed in this commit ffbc75a#diff-11144739384955df1f8f38cbcde8d95b


Affects: 5.1.2

Reference URL: #17057

Issue Links:

  • #20933 Upgrade to Reactor Netty 0.8
  • #17057 Spring Websockets Broker relay supporting a cluster of STOMP endpoint addresses

Referenced from: commits 24848ec


This comment has been minimized.

Copy link
Collaborator Author

spring-issuemaster commented Nov 20, 2018

Rossen Stoyanchev commented

The Reactor Netty config API changed from 0.7 to 0.8. We lost the builder to an immutable pattern with config methods returning a new instance of TcpClient.

You still have the constructor taking TcpClient but that requires to take over resource management, which could be done in 5.1+ with the ReactorResourceFactor, but I get the point that an option to provide a supplier of addresses without taking over the management of resource is now missing.

I'll add a constructor with those semantics. Something like this:

public ReactorNettyTcpClient(Function<TcpClient, TcpClient> configurer, ReactorNettyCodec<P> codec) {
    // ...

So you could then:

new ReactorNettyTcpClient(client -> client.addressSupplier(...), codec);

I'll also update the sample in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.