From 013f278c91b515f6dbc01b614a3c3153c75c722c Mon Sep 17 00:00:00 2001 From: "Sverre H. Huseby" Date: Sun, 29 Sep 2024 14:05:43 +0200 Subject: [PATCH] fix: use getAdmin instead of admin to ensure object is created --- src/main/java/io/statnett/k3a/lagexporter/ClusterClient.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/io/statnett/k3a/lagexporter/ClusterClient.java b/src/main/java/io/statnett/k3a/lagexporter/ClusterClient.java index 10fbe10..f49c53f 100644 --- a/src/main/java/io/statnett/k3a/lagexporter/ClusterClient.java +++ b/src/main/java/io/statnett/k3a/lagexporter/ClusterClient.java @@ -83,7 +83,7 @@ public Map> consumerGroupOffsets( try { final Map groupSpecs = consumerGroupIds.stream() .collect(Collectors.toMap(identity(), s -> new ListConsumerGroupOffsetsSpec().topicPartitions(null))); - return admin.listConsumerGroupOffsets(groupSpecs).all().get(); + return getAdmin().listConsumerGroupOffsets(groupSpecs).all().get(); } catch (final Exception e) { throw new RuntimeException(e); } finally {