Skip to content

Add specific requestChannel(Payload, Publisher<Payload>) support for RSocket Server #569

Closed

Description

@smaldini

An RSocketServer extending RSocket could be a runtime detected feature that allows invoking a 2-arguments Payload/Publisher RSocket handler method.

The reason for a 2-arguments is to explicitly separate the first Payload possibly carrying routing informations (rsocket/rsocket#254) or any other such as tracing, composite etc. All others interactions do not have this issues having a single Payload argument readily available for introspection where requestChannel requires the user to peek the first emitted Payload to achieve the same effect.

Activity

  1. yschimke commented on Jan 25, 2019

    @yschimke
    Member

    I like this option because the wrinkles with this interaction are

    • needing first message to route
    • supporting a channel that starts with messages from the server to the client before first message
    • different types specifically for the first message

    Should this interaction be flagged in the channel metadata when possible?

    Sent with GitHawk

  2. robertroeser commented on Jan 26, 2019

    @robertroeser
    Member

    I would prefer we don't characterize this as something for metadata. I think if we're doing this it's to optimize requestChannel so you don't need to call the SwitchTransform to peek at the first payload. It is equally likely that an end user may want to look at their first payload and see where to send the request.

    The reason for a 2-arguments is to explicitly separate the first Payload possibly carrying routing informations (rsocket/rsocket#254) ...

    To prevent confusion we aren't separating the first payload. Like you said - we are letting you peak at the first item emitted from a stream without using SwitchTranform. The first emitted payload is the same payload as the Payload argument passed in requestChannel(Payload payload, Publishers publishers)

    Regarding metadata sent once - that is possible now. Its up to the Payload creator if they want to send the metadata each time.

  3. smaldini commented on Feb 14, 2019

    @smaldini
    MemberAuthor

    fixed by the PR above

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions