-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Add handleErrorFrame callback for STOMP handler #26780
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
Conversation
…rame when the frame type is "ERROR"
|
@ppshinebl Please sign the Contributor License Agreement! Click here to manually synchronize the status of this Pull Request. See the FAQ for frequently asked questions. |
|
@ppshinebl Thank you for signing the Contributor License Agreement! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that the year needs to be updated in the license header of the modified files.
Please refere License section in Code-Style.
| */ | ||
| void handleFrame(StompHeaders headers, @Nullable Object payload); | ||
|
|
||
| void handleErrorFrame(StompHeaders headers, @Nullable byte[] payload); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
documentation seems be needed.
|
To handle an If anything it would be an option to expose Thanks for the suggestion in any case. |
|
Hi @rstoyanchev
The ERROR frame could be subscription specific.
I agree that it would make more sense to move handleErrorFrame from StompFrameHandler to StompSessionHandler, do you have any more concern? |
|
@ppshinebl did you mean to mention @rstoyanchev on your previous comment? |
I think you mean it can be related or triggered by but the ERROR frame is not linked to a subscription in any formal way. It would have to have the subscription id, just like the I don't think it makes sense to add a dedicated |
The STOMP specification defines an ERROR frame, but in the handler just mix it with normal message frame handling, that's misleading and very amibigous. |
|
No there is no mixing. The global StompSessionHandler does not get any frames. |
|
@rstoyanchev |
The previous implementation invoke handleFrame no matter the frame is "MESSAGE" nor "ERROR". This commit add a new callback "handleErrorFrame" to the handler to separate from the message frame handling.
Reason: