Description
Gottfried Huber opened SPR-14568 and commented
I think this was introduced with #16893
StompSubProtocolHandler.getStompHeaderAccessor converts a DISCONNECT_ACK to an ERROR message.
This has the effect that on the client side, the error-callback is called instead of the expected disconnect-callback, which leads to some very dirty workarounds for keeping the state sane.
This only happens when using SimpleBrokerMessageHandler. With the StompBrokerRelayMessageHandler, the MessageHeaderAccessor is already instanceof StompHeaderAccessor, and I don't get into the else if clause where the ERROR thing happens.
I would expect to see -StompHeaderAccessor.create(StompCommand.DISCONNECTED)- a RECEIPT frame response according to the receipt header of the DISCONNECT frame
Affects: 4.2.7, 4.3.1
Issue Links:
- SockJS heartbeat is causing application send Message to fail similar to (SPR-14356) [SPR-14564] #19133 SockJS heartbeat is causing application send Message to fail similar to (SPR-14356)
- Allow server-side code to send DISCONNECT messages to the broker [SPR-12288] #16893 Allow server-side code to send DISCONNECT messages to the broker
Referenced from: commits cc33bfa, 8b4f60b, 198a74d
Backported to: 4.2.8