@@ -37,6 +37,7 @@ public class ImmutableConfig implements
37
37
private final Duration wsReceiveMessageTimeout ;
38
38
private final Duration wsConsumerGraceTimeout ;
39
39
private final Duration wsRefreshConnectionTimeout ;
40
+ private final Duration wsPingInterval ;
40
41
private final int wsNumberOfConnections ;
41
42
42
43
public ImmutableConfig (final MbsSdkConfig config ) {
@@ -47,20 +48,21 @@ public ImmutableConfig(final MbsSdkConfig config) {
47
48
this .wsServer = notNull (config .getWsServer (), "wsServer" );
48
49
this .operatorId = config .getOperatorId ();
49
50
this .authRequestTimeout = withDefault (config .getAuthRetryDelay (), Duration .ofSeconds (5 ), MIN_DURATION );
50
- this .authRetryDelay = withDefault (config .getAuthRetryDelay (), Duration .ofMillis ( 500 ), MIN_DURATION );
51
+ this .authRetryDelay = withDefault (config .getAuthRetryDelay (), Duration .ofSeconds ( 1 ), MIN_DURATION );
51
52
this .wsNumberOfConnections = withDefault (config .getWsNumberOfConnections (), 1 , 1 );
52
53
this .wsReconnectTimeout = withDefault (config .getWsReconnectTimeout (), Duration .ofSeconds (10 ), MIN_DURATION );
53
54
this .wsFetchMessageTimeout = withDefault (config .getWsFetchMessageTimeout (), Duration .ofSeconds (1 ), MIN_DURATION );
54
55
this .wsSendMessageTimeout = withDefault (config .getWsSendMessageTimeout (), Duration .ofSeconds (1 ), MIN_DURATION );
55
56
this .wsReceiveMessageTimeout = withDefault (config .getWsReceiveMessageTimeout (), Duration .ofSeconds (30 ), MIN_DURATION );
56
- this .wsConsumerGraceTimeout = withDefault (config .getWsConsumerGraceTimeout (), Duration .ofMinutes (1 ), MIN_DURATION );
57
+ this .wsConsumerGraceTimeout = withDefault (config .getWsConsumerGraceTimeout (), Duration .ofMinutes (10 ), MIN_DURATION );
57
58
this .wsRefreshConnectionTimeout = withDefault (config .getWsRefreshConnectionTimeout (), Duration .ofMinutes (100 ), MIN_DURATION );
58
59
this .protocolRetryCount = withDefault (config .getProtocolRetryCount (), 0 , 0 );
59
60
this .protocolMaxSendBufferSize = withDefault (config .getProtocolMaxSendBufferSize (), 1_000 , 1 );
60
61
this .protocolConnectTimeout = withDefault (config .getProtocolConnectTimeout (), Duration .ofSeconds (10 ), MIN_DURATION );
61
62
this .protocolReceiveResponseTimeout = withDefault (config .getProtocolReceiveResponseTimeout (), Duration .ofSeconds (20 ), MIN_DURATION );
62
63
this .protocolEnqueueTimeout = withDefault (config .getProtocolEnqueueTimeout (), Duration .ofMillis (100 ), MIN_DURATION );
63
64
this .protocolDequeueTimeout = withDefault (config .getProtocolDequeueTimeout (), Duration .ofSeconds (1 ), MIN_DURATION );
65
+ this .wsPingInterval = withDefault (config .getWsPingInterval (), Duration .ofMinutes (1 ), MIN_DURATION );
64
66
this .protocolNumberOfDispatchers = withDefault (config .getProtocolNumberOfDispatchers (), 1 , 1 );
65
67
}
66
68
@@ -173,4 +175,9 @@ public Duration getWsRefreshConnectionTimeout() {
173
175
public int getWsNumberOfConnections () {
174
176
return wsNumberOfConnections ;
175
177
}
178
+
179
+ @ Override
180
+ public Duration getWsPingInterval () {
181
+ return wsPingInterval ;
182
+ }
176
183
}
0 commit comments