Description
I have configured registry.setPreserveReceiveOrder(true);
to process received messages in order
and am using Spring Security to perform authorization checks during subscriptions.
Before enabling this option, we were using ExecutorSubscribableChannel
, where exceptions were wrapped in a MessageDeliveryException
and thrown to the higher layers.
After enabling this option, however, exceptions are caught by OrderedMessageChannelDecorator
during processing, preventing error messages from being delivered to the client when subscription authorization fails.
Previously, exceptions were propagated to StompSubProtocolErrorHandler
via StompSubProtocolHandler.handleError()
Is this behavior—preventing exceptions from being propagated to the client—an intended design?
Is there a way to propagate exceptions to the client through StompSubProtocolErrorHandler
?
The versions in use are Spring Boot 3.3.0 and Spring WebSocket/Message 6.1.8.