Ability to store session object inside RSocketRequester chain · Issue #1068 · rsocket/rsocket-java · GitHub
Skip to content

Ability to store session object inside RSocketRequester chain #1068

Open

Description

@maxim-bandurko-lsvt

Hello.

Would be very nice to add to somewhere inside RSocketRequester the AtomicReference<Object> type field that will cache the session object for reuse, especially it will be very convenient to obtain value from it inside MessageMappings at Spring Boot.

I am coming from this: #831 and had implemented a basic wrapper around WebsocketDuplexConnection as to cache this value. Not a big deal, it is just needed to use reflection per each ws route as to get that session object, but would be nice, if that it can have native public method not so chained to obtain it.

Thank you.

Activity

  1. maxim-bandurko-lsvt commented on Sep 8, 2022

    @maxim-bandurko-lsvt
    Author

    Forgot to add, it is Object type because it can be anything that may be needed. For example, Long, instance or even Mono Publisher that will supply the needed instance from session storage. I think that it will be very useful, as it will allow finally to have sessions insider RSocket and more on that, sessions can use Spring Security part and have same sessions to both RSocket and Spring Boot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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