Fix issue with subscribe destination
The original fix for SPR-11423:
32e5f57e64
was insufficient when using an external broker since the original
destination header has to be in the "native headers" map (i.e. with
STOMP headers) in order to be included in messages broadcast by
the broker.
This commit is contained in:
@@ -156,7 +156,7 @@ public class UserDestinationMessageHandler implements MessageHandler, SmartLifec
|
||||
}
|
||||
SimpMessageHeaderAccessor headerAccessor = SimpMessageHeaderAccessor.wrap(message);
|
||||
if (SimpMessageType.MESSAGE.equals(headerAccessor.getMessageType())) {
|
||||
headerAccessor.setHeader(SUBSCRIBE_DESTINATION, result.getSubscribeDestination());
|
||||
headerAccessor.setNativeHeader(SUBSCRIBE_DESTINATION, result.getSubscribeDestination());
|
||||
message = MessageBuilder.withPayload(message.getPayload()).setHeaders(headerAccessor).build();
|
||||
}
|
||||
for (String targetDestination : destinations) {
|
||||
|
||||
Reference in New Issue
Block a user