Skip to content

Commit

Permalink
Replace duplicate code with existing method
Browse files Browse the repository at this point in the history
Resolves #2702
  • Loading branch information
chanhyeong authored and olegz committed Apr 11, 2023
1 parent 86df597 commit 6c193d6
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -561,8 +561,7 @@ public Collection<PartitionInfo> getPartitionsForTopic(final int partitionCount,
// In some cases, the above partition query may not throw an UnknownTopic..Exception for various reasons.
// For that, we are forcing another query to ensure that the topic is present on the server.
if (CollectionUtils.isEmpty(partitions)) {
try (AdminClient adminClient = AdminClient
.create(this.adminClientProperties)) {
try (AdminClient adminClient = createAdminClient()) {
final DescribeTopicsResult describeTopicsResult = adminClient
.describeTopics(Collections.singletonList(topicName));

Expand Down

0 comments on commit 6c193d6

Please sign in to comment.