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

RSocketRequester disposal of underlying RSocketClient #26886

Closed
joshiste opened this issue May 3, 2021 · 1 comment
Closed

RSocketRequester disposal of underlying RSocketClient #26886

joshiste opened this issue May 3, 2021 · 1 comment
Assignees
Labels
in: messaging Issues in messaging modules (jms, messaging) type: enhancement A general enhancement
Milestone

Comments

@joshiste
Copy link
Contributor

joshiste commented May 3, 2021

Affects: 5.3.6

When using RSocketRequester.builder().transport() a new underlying RSocketClient is created (which is hidden from the user of this API). The RSocketClient must be disposed to free the underlying resources (or not?).

Imho the current API design totally hides that there are resources allocated and must be disposed - it is nowhere stated in the docs and also the RSocketRequester has not dispose() method or similar.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label May 3, 2021
@rstoyanchev
Copy link
Contributor

rstoyanchev commented May 7, 2021

RSocketRequest wraps and delegates to RSocketClient in order to provide additional benefits. You can access the underlying RSocketClient instance via RSocketRequester#rsocketClient().

In general this does not allocate resources by default but once you start making connections, those are long lived, it's the nature of messaging communication, and it is necessary to call dispose on the RSocketClient. We can make RSocketRequester implement Disposable providing a shortcut that simply delegates to the underlying instance.

@rstoyanchev rstoyanchev self-assigned this May 7, 2021
@rstoyanchev rstoyanchev added in: messaging Issues in messaging modules (jms, messaging) type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels May 7, 2021
@rstoyanchev rstoyanchev added this to the 5.3.7 milestone May 7, 2021
Zoran0104 pushed a commit to Zoran0104/spring-framework that referenced this issue Aug 20, 2021
lxbzmy pushed a commit to lxbzmy/spring-framework that referenced this issue Mar 26, 2022
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

3 participants