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

Ongoing flux subscription is not getting cancelled even if the client is closed #1094

Open
SB-DevX opened this issue Jul 31, 2023 · 0 comments

Comments

@SB-DevX
Copy link

SB-DevX commented Jul 31, 2023

When the client is closed, the rsocket server does not receive the cancellation event and ongoing flux subscription still continues which leads to data loss.
How to cancel the ongoing subscription in server side when client is closed ?

Expected Behavior

If the client closes then server should also close all the active subscription for that client to prevent data loss.

Actual Behavior

If the client closes then server is not closing the active subscription. And if the flux is never ending, it leads to data loss.

Here is how I created the RSocketRequestor Bean in client side:

rSocketRequesterBuilder
                                 .setupRoute("requests.registration")
                                 .setupData(clientId)
                                 .rsocketStrategies(rSocketStrategies)
                                 .rsocketConnector(connector -> connector.reconnect(retryBackoffSpec)
                                                                        .resume(new Resume().retry(retryBackoffSpec)))
                                 .tcp("[localhost](http://localhost/)", 8085)

RSocket version(s) used: 1.1.3
Netty version: 4.1.93.Final
JAVA version: 17

Hi, I have new to rsocket, not sure how to handle the above scenario. If there is any workaround to handle the above scenario, could you please help me ?

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

1 participant