@@ -39,8 +39,9 @@ public class RetryingKafkaConnectClient extends KafkaConnectClientApi {
39
39
40
40
public RetryingKafkaConnectClient (ClustersProperties .ConnectCluster config ,
41
41
@ Nullable ClustersProperties .TruststoreConfig truststoreConfig ,
42
- DataSize maxBuffSize ) {
43
- super (new RetryingApiClient (config , truststoreConfig , maxBuffSize ));
42
+ DataSize maxBuffSize ,
43
+ Duration responseTimeout ) {
44
+ super (new RetryingApiClient (config , truststoreConfig , maxBuffSize , responseTimeout ));
44
45
}
45
46
46
47
private static Retry conflictCodeRetry () {
@@ -318,14 +319,16 @@ private static class RetryingApiClient extends ApiClient {
318
319
319
320
public RetryingApiClient (ClustersProperties .ConnectCluster config ,
320
321
ClustersProperties .TruststoreConfig truststoreConfig ,
321
- DataSize maxBuffSize ) {
322
- super (buildWebClient (maxBuffSize , config , truststoreConfig ), null , null );
322
+ DataSize maxBuffSize ,
323
+ Duration responseTimeout ) {
324
+ super (buildWebClient (maxBuffSize , responseTimeout , config , truststoreConfig ), null , null );
323
325
setBasePath (config .getAddress ());
324
326
setUsername (config .getUsername ());
325
327
setPassword (config .getPassword ());
326
328
}
327
329
328
330
public static WebClient buildWebClient (DataSize maxBuffSize ,
331
+ Duration responseTimeout ,
329
332
ClustersProperties .ConnectCluster config ,
330
333
ClustersProperties .TruststoreConfig truststoreConfig ) {
331
334
return new WebClientConfigurator ()
@@ -341,6 +344,7 @@ public static WebClient buildWebClient(DataSize maxBuffSize,
341
344
config .getPassword ()
342
345
)
343
346
.configureBufferSize (maxBuffSize )
347
+ .configureResponseTimeout (responseTimeout )
344
348
.build ();
345
349
}
346
350
}
0 commit comments