Skip to content

Commit

Permalink
fix: use getAdmin instead of admin to ensure object is created (#220)
Browse files Browse the repository at this point in the history
  • Loading branch information
sverrehu authored Sep 29, 2024
1 parent 7fd821d commit 66a3636
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public Map<String, Map<TopicPartition, OffsetAndMetadata>> consumerGroupOffsets(
try {
final Map<String, ListConsumerGroupOffsetsSpec> 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 {
Expand Down

0 comments on commit 66a3636

Please sign in to comment.