I am creating simple STOMP broker using @EnableWebSocketMessageBroker. When RuntimeException happens in @MessageMapping method I would like to receive STOMP ERROR frame, but it doesn't work like that by default.
It seems that ERROR frame is not supported in simple broker:
https://github.com/spring-projects/spring-framework/blob/master/spring-messaging/src/main/java/org/springframework/messaging/simp/SimpMessageType.java#L28-L44
On the other hand, there is a mechanism to send ERROR frames already available in spring-websocket and its code references some classes which are related to simple broker:
https://github.com/spring-projects/spring-framework/blob/master/spring-websocket/src/main/java/org/springframework/web/socket/messaging/StompSubProtocolHandler.java#L349
How to enable mechanism of sending ERROR frames when RuntimeException happens in @MessageMapping method?