Skip to content

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

@SB-DevX

Description

@SB-DevX

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 ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions