Skip to content

Commit 793dac5

Browse files
committed
Default timeout for http requests to prevent hanging - ability to configurate in properties
1 parent 9ea7fc7 commit 793dac5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

api/src/main/java/io/kafbat/ui/config/WebclientProperties.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
public class WebclientProperties {
1414

1515
String maxInMemoryBufferSize;
16-
Integer responseTimeout;
16+
Integer responseTimeoutMs;
1717

1818
@PostConstruct
1919
public void validate() {

api/src/main/java/io/kafbat/ui/service/KafkaClusterFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public KafkaClusterFactory(WebclientProperties webclientProperties) {
4747
this.webClientMaxBuffSize = Optional.ofNullable(webclientProperties.getMaxInMemoryBufferSize())
4848
.map(DataSize::parse)
4949
.orElse(DEFAULT_WEBCLIENT_BUFFER);
50-
this.responseTimeout = Optional.ofNullable(webclientProperties.getResponseTimeout())
50+
this.responseTimeout = Optional.ofNullable(webclientProperties.getResponseTimeoutMs())
5151
.map(Duration::ofMillis)
5252
.orElse(DEFAULT_RESPONSE_TIMEOUT);
5353
}

0 commit comments

Comments
 (0)