Skip to content

Commit 7290bc1

Browse files
committed
GH-2430: Fix TimeUnit in describeCluster Calls
Resolves #2430
1 parent 4bcb503 commit 7290bc1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spring-kafka/src/main/java/org/springframework/kafka/core/KafkaAdmin.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ public final boolean initialize() {
202202
try {
203203
synchronized (this) {
204204
this.clusterId = adminClient.describeCluster().clusterId().get(this.operationTimeout,
205-
TimeUnit.MILLISECONDS);
205+
TimeUnit.SECONDS);
206206
}
207207
addOrModifyTopicsIfNeeded(adminClient, newTopics);
208208
return true;
@@ -230,7 +230,7 @@ public final boolean initialize() {
230230
public String clusterId() {
231231
if (this.clusterId == null) {
232232
try (AdminClient client = createAdmin()) {
233-
this.clusterId = client.describeCluster().clusterId().get(this.operationTimeout, TimeUnit.MILLISECONDS);
233+
this.clusterId = client.describeCluster().clusterId().get(this.operationTimeout, TimeUnit.SECONDS);
234234
}
235235
catch (Exception ex) {
236236
LOGGER.error(ex, "Could not obtaine cluster info");

0 commit comments

Comments
 (0)