Skip to content

ConnectionMapping annotation for handling of RSocket connection-level frames #23177

@rstoyanchev

Description

@rstoyanchev

The ConnectionSetupPayload at the start of on an RSocket connection is currently handled with a @MessageMapping method like any subsequent stream on the same connection. The client then must include a route in the metadata of the SETUP frame, or else the ConnectionSetupPayload would have to be handled with an empty mapping, which is not ideal and could also catch subsequent streams without a route. One could use a wildcard mapping but that makes it even more likely to match subsequent streams on the connection, likely not intentionally.

Furthermore, the handling of ConnectionSetupPayload is optional, so if there is no matching handler, no error is raised, unlike subsequent streams on the same connection for which an error is raised if there is no matching handler.

We should introduce a ConnectionMapping annotation for use with RSocket handlers that would be used to process connection-level frames, the initial SETUP and subsequent METADATA_PUSH. That would separate clearly the handling of four stream request types from connection-level events.

Metadata

Metadata

Assignees

Labels

in: messagingIssues in messaging modules (jms, messaging)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions