Skip to content
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

Expose headers from STOMP RECEIPT frame to registered callbacks #28715

Conversation

schnapster
Copy link
Contributor

@schnapster schnapster commented Jun 27, 2022

My use case for wanting access to the headers in receipt callbacks is to communicate additional information about the result of processing of a message back to the client.

Relevant parts from the STOMP docs: https://stomp.github.io/stomp-specification-1.2.html#RECEIPT

RECEIPT
A RECEIPT frame is sent from the server to the client once a server has successfully
processed a client frame that requests a receipt. A RECEIPT frame MUST include
the header receipt-id, where the value is the value of the receipt header in the frame
which this is a receipt for.

RECEIPT
receipt-id:message-12345

^@
A RECEIPT frame is an acknowledgment that the corresponding client frame has
been processed by the server. Since STOMP is stream based, the receipt is also
a cumulative acknowledgment that all the previous frames have been received by
the server. However, these previous frames may not yet be fully processed. If the
client disconnects, previously received frames SHOULD continue to get
processed by the server.

Please let me know if I can improve anything or if you think this requires more discussion up front =)

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Jun 27, 2022
@schnapster schnapster force-pushed the feature/stomp-receipt-header-callback branch from 534d3c7 to d87b9e6 Compare June 28, 2022 07:39
@schnapster
Copy link
Contributor Author

Ahoy, I'd like to get this into the 5.x version of the framework. Happy to do the backporting, however, is it ok to have the deprecation hit an upcoming 5.3.x release or would that be a problem?

Copy link
Contributor

@rstoyanchev rstoyanchev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's fine to add an extra receipt callback with headers, in case you need it, but if you don't, I see no reason to deprecate the existing one without the headers. Could you revise the PR along those lines?

@rstoyanchev rstoyanchev added this to the Triage Queue milestone Aug 1, 2022
@rstoyanchev rstoyanchev self-assigned this Aug 1, 2022
@rstoyanchev rstoyanchev added in: web Issues in web modules (web, webmvc, webflux, websocket) status: waiting-for-feedback We need additional information before we can continue labels Aug 1, 2022
@schnapster schnapster force-pushed the feature/stomp-receipt-header-callback branch from d87b9e6 to c42699e Compare August 1, 2022 15:41
@schnapster
Copy link
Contributor Author

Removed the deprecation code for the callback without headers.

@spring-projects-issues spring-projects-issues added status: feedback-provided Feedback has been provided and removed status: waiting-for-feedback We need additional information before we can continue labels Aug 1, 2022
@rstoyanchev rstoyanchev modified the milestones: Triage Queue, 5.3.23 Aug 2, 2022
@rstoyanchev rstoyanchev added type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged or decided on status: feedback-provided Feedback has been provided labels Aug 2, 2022
@rstoyanchev rstoyanchev changed the title Pass headers to STOMP receipt callbacks Expose headers from STOMP RECEIPT frame to registered callbacks Sep 12, 2022
rstoyanchev pushed a commit that referenced this pull request Sep 12, 2022
@schnapster schnapster deleted the feature/stomp-receipt-header-callback branch September 12, 2022 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants