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

Create RSocketRequesterBuilder in spring-messaging #22806

Closed
bclozel opened this issue Apr 16, 2019 · 1 comment
Closed

Create RSocketRequesterBuilder in spring-messaging #22806

bclozel opened this issue Apr 16, 2019 · 1 comment
Assignees
Labels
in: messaging Issues in messaging modules (jms, messaging) type: enhancement A general enhancement
Milestone

Comments

@bclozel
Copy link
Member

bclozel commented Apr 16, 2019

Spring Messaging currently provides an RSocketRequester that takes a raw RSocket and codec strategies.

We should add a RSocketRequestBuilder so as to help developers build the RSocketRequester and customize the underlying RSocket. This builder could be auto-configured in Spring Boot and injected in application components.

@bclozel bclozel added in: messaging Issues in messaging modules (jms, messaging) type: enhancement A general enhancement labels Apr 16, 2019
@bclozel bclozel added this to the 5.2 M2 milestone Apr 16, 2019
@bclozel bclozel self-assigned this Apr 16, 2019
@rstoyanchev
Copy link
Contributor

We could make this a nested interface, i.e. RSocketRequester.Builder exposing create shortcuts and builder methods directly on RSocketRequester, like WebClient.Builder. In that case we should also re-consider (likely remove) the current create method and instead private "create" shortcuts for specific scenarios.

For client use (i.e. establishing a connection):

RSocketRequester connectTcp(String host, int port, MimeType dataMimeType);
RSocketRequester connectWebSocket(URI uri, MimeType dataMimeType);
Builder builder(MimeType dataMimeType); // all options

For responder use (regardless of client or server):

RSocketRequester wrap(ConnectionSetupPayload setup, RSocket rsocket);

@rstoyanchev rstoyanchev changed the title Create a RSocketRequestBuilder in Spring Messaging Create RSocketRequesterBuilder in spring-messaging Apr 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: messaging Issues in messaging modules (jms, messaging) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants