Skip to content

Commit

Permalink
fix(get metadata): avoid always creating new admin client (#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
medreza committed Jan 10, 2024
1 parent 782a98b commit 9a3b11c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kafka.go
Original file line number Diff line number Diff line change
Expand Up @@ -1005,8 +1005,9 @@ func (client *KafkaClient) getAdminClient(config *kafka.ConfigMap) (*kafka.Admin
if err != nil {
return nil, err
}
client.adminClient = adminClient

return adminClient, nil
return client.adminClient, nil
}

func (client *KafkaClient) GetMetadata(topic string, timeout time.Duration) (*Metadata, error) {
Expand Down

0 comments on commit 9a3b11c

Please sign in to comment.