diff --git a/README.md b/README.md index 29a1ea0b3..fcb26c19c 100644 --- a/README.md +++ b/README.md @@ -858,9 +858,16 @@ delete.topic.enable=true ### Get topic metadata ```javascript -await admin.getTopicMetadata() +await admin.getTopicMetadata({ topics: }) ``` +`TopicsMetadata` structure: + +```javascript +{ + topics: >, +} + `TopicMetadata` structure: ```javascript @@ -882,7 +889,14 @@ await admin.getTopicMetadata() } ``` -By default the admin client will throw an exception if the topic does not already exist. +The admin client will throw an exception if any of the provided topics do not already exist. + +If you omit the `topics` argument the admin client will fetch metadata for all topics +of which it is already aware (all the cluster's target topics): + +``` +await admin.getTopicMetadata(); +``` ### Fetch consumer group offsets