Skip to content

Support sending response payload metadata from RSocket Controllers #27478

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

Closed
gadams00 opened this issue Sep 27, 2021 · 3 comments
Closed

Support sending response payload metadata from RSocket Controllers #27478

gadams00 opened this issue Sep 27, 2021 · 3 comments
Labels
in: messaging Issues in messaging modules (jms, messaging)

Comments

@gadams00
Copy link

With bare RSocket, you can return payload metadata from a SocketAcceptor, and an RSocket client can receive that payload with metadata. Using Spring @Controller-annotated classes with @MessageMapping-annotated methods, you can't return any metadata/headers, the only supported direction for headers is in. RSocketRequester also has no way to receive them.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Sep 27, 2021
@rstoyanchev rstoyanchev added the in: messaging Issues in messaging modules (jms, messaging) label Nov 10, 2021
@rstoyanchev
Copy link
Contributor

rstoyanchev commented Jan 12, 2024

RSocketRequester allows sending metadata with a request, and @MessageMapping methods can access that as @Header arguments if there is a registered MetadataExtractor.

To enable the same for responses, we would need some container of metadata+payload that a controller method can return, most likely Message, which is what we use for request metadata. So a controller method returns a Message with headers and payload, and an application supplied MetadataInserter to help encode metadata entries from a map of headers. The requester would then decode to a Mono or Flux of Message<T>, and we could use the same registered MetadataExtractor to extract headers.

It would be useful to understand more about the need for this. For example if it relates to #26379, then better to focus on that before it's clear that this is also needed.

@rstoyanchev rstoyanchev added the status: waiting-for-feedback We need additional information before we can continue label Jan 12, 2024
@spring-projects-issues
Copy link
Collaborator

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

@spring-projects-issues spring-projects-issues added the status: feedback-reminder We've sent a reminder that we need additional information before we can continue label Jan 19, 2024
@spring-projects-issues
Copy link
Collaborator

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.

@spring-projects-issues spring-projects-issues closed this as not planned Won't fix, can't repro, duplicate, stale Jan 26, 2024
@spring-projects-issues spring-projects-issues removed status: waiting-for-feedback We need additional information before we can continue status: feedback-reminder We've sent a reminder that we need additional information before we can continue status: waiting-for-triage An issue we've not yet triaged or decided on labels Jan 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: messaging Issues in messaging modules (jms, messaging)
Projects
None yet
Development

No branches or pull requests

3 participants