Support user destinations with multiple app servers
This change adds support for broadcasting messages with unresolved user destinations so that other servers can try to resolve it. That enables sending messages to users who may be connected to a different server. Issue: SPR-11620
This commit is contained in:
@@ -275,6 +275,12 @@ public class MessageBrokerBeanDefinitionParserTests {
|
||||
// expected
|
||||
}
|
||||
|
||||
UserDestinationMessageHandler userDestHandler = this.appContext.getBean(UserDestinationMessageHandler.class);
|
||||
assertEquals("/topic/unresolved", userDestHandler.getUserDestinationBroadcast());
|
||||
assertNotNull(messageBroker.getSystemSubscriptions());
|
||||
assertSame(userDestHandler, messageBroker.getSystemSubscriptions().get("/topic/unresolved"));
|
||||
|
||||
|
||||
String name = "webSocketMessageBrokerStats";
|
||||
WebSocketMessageBrokerStats stats = this.appContext.getBean(name, WebSocketMessageBrokerStats.class);
|
||||
String actual = stats.toString();
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/websocket http://www.springframework.org/schema/websocket/spring-websocket.xsd">
|
||||
|
||||
<websocket:message-broker order="2">
|
||||
<websocket:message-broker order="2" user-destination-broadcast="/topic/unresolved">
|
||||
<websocket:stomp-endpoint path="/foo">
|
||||
<websocket:sockjs/>
|
||||
</websocket:stomp-endpoint>
|
||||
|
||||
Reference in New Issue
Block a user