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
Prior to this commit, one couldn't set the virtualHost property on
StompBrokerRelayMessageHandler via JavaConfig, since
StompBrokerRelayRegistration's API didn't offer that possibility.
This commit adds a new method in StompBrokerRelayRegistration's fluent
API to set the virtualHost used by StompBrokerRelayMessageHandler.
Note: this property is already configurable via xml config.
Issue: SPR-11433
Copy file name to clipboardExpand all lines: spring-messaging/src/main/java/org/springframework/messaging/simp/config/StompBrokerRelayRegistration.java
+18Lines changed: 18 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -45,6 +45,8 @@ public class StompBrokerRelayRegistration extends AbstractBrokerRegistration {
45
45
46
46
privateLongsystemHeartbeatReceiveInterval;
47
47
48
+
privateStringvirtualHost;
49
+
48
50
privatebooleanautoStartup = true;
49
51
50
52
@@ -146,6 +148,19 @@ public StompBrokerRelayRegistration setSystemHeartbeatReceiveInterval(long heart
146
148
returnthis;
147
149
}
148
150
151
+
/**
152
+
* Set the value of the "host" header to use in STOMP CONNECT frames. When this
153
+
* property is configured, a "host" header will be added to every STOMP frame sent to
154
+
* the STOMP broker. This may be useful for example in a cloud environment where the
155
+
* actual host to which the TCP connection is established is different from the host
Copy file name to clipboardExpand all lines: spring-messaging/src/test/java/org/springframework/messaging/simp/config/StompBrokerRelayRegistrationTests.java
0 commit comments