You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompBrokerRelayMessageHandler.java
+58-7Lines changed: 58 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -47,9 +47,24 @@
47
47
48
48
49
49
/**
50
-
* A {@link MessageHandler} that handles messages by forwarding them to a STOMP broker and
51
-
* reversely sends any returned messages from the broker to the provided
52
-
* {@link MessageChannel}.
50
+
* A {@link MessageHandler} that handles messages by forwarding them to a STOMP broker.
51
+
* For each new {@link SimpMessageType#CONNECT CONNECT} message, an independent TCP
52
+
* connection to the broker is opened and used exclusively for all messages from the
53
+
* client that originated the CONNECT message. Messages from the same client are
54
+
* identified through the session id message header. Reversely, when the STOMP broker
55
+
* sends messages back on the TCP connection, those messages are enriched with the session
56
+
* id of the client and sent back downstream through the {@link MessageChannel} provided
57
+
* to the constructor.
58
+
* <p>
59
+
* This class also automatically opens a default "system" TCP connection to the message
60
+
* broker that is used for sending messages that originate from the server application (as
61
+
* opposed to from a client). Such messages are recognized because they are not associated
62
+
* with any client and therefore do not have a session id header. The "system" connection
63
+
* is effectively shared and cannot be used to receive messages. Several properties are
64
+
* provided to configure the "system" session including the the
Copy file name to clipboardExpand all lines: spring-messaging/src/test/java/org/springframework/messaging/simp/stomp/StompBrokerRelayMessageHandlerIntegrationTests.java
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -113,6 +113,8 @@ public void tearDown() throws Exception {
113
113
}
114
114
}
115
115
116
+
// test "host" header (virtualHost property) when TCP client is behind interface and configurable
0 commit comments