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
Make the broker relay heartbeat intervals configurable
Prior to this commit, the intervals at which the broker relay's system
session would send heartbeats to the STOMP broker and expect to
receive heartbeats from the STOMP broker were hard-coded at 10
seconds.
This commit makes the intervals configurable, with 10 seconds being
the default value.
Copy file name to clipboardExpand all lines: spring-messaging/src/main/java/org/springframework/messaging/simp/config/StompBrokerRelayRegistration.java
+37-2Lines changed: 37 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -37,6 +37,10 @@ public class StompBrokerRelayRegistration extends AbstractBrokerRegistration {
37
37
38
38
privateStringapplicationPasscode = "guest";
39
39
40
+
privateLongsystemHeartbeatSendInterval;
41
+
42
+
privateLongsystemHeartbeatReceiveInterval;
43
+
40
44
privatebooleanautoStartup = true;
41
45
42
46
@@ -63,7 +67,7 @@ public StompBrokerRelayRegistration setRelayPort(int relayPort) {
63
67
}
64
68
65
69
/**
66
-
* Set the login for a "system" TCP connection used to send messages to the STOMP
70
+
* Set the login for the "system" relay session used to send messages to the STOMP
67
71
* broker without having a client session (e.g. REST/HTTP request handling method).
Copy file name to clipboardExpand all lines: spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompBrokerRelayMessageHandler.java
+52-13Lines changed: 52 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -67,6 +67,10 @@ public class StompBrokerRelayMessageHandler extends AbstractBrokerMessageHandler
Copy file name to clipboardExpand all lines: spring-messaging/src/test/java/org/springframework/messaging/simp/stomp/StompBrokerRelayMessageHandlerIntegrationTests.java
0 commit comments