compare_clusters
Identify topic differences between Kafka clusters to find missing, differing, or matching topics and broker counts across environments without changing anything.
Instructions
Compare the topics of 1 to 100 other clusters against the one this endpoint serves, through items. Reports which topics only this cluster has, which only the other has, which exist on both but disagree, and how many brokers and topics each side has. Comparing one cluster is an items array of length one.
Use it to find what preproduction has that production does not, or to check whether two environments still match. Topics reported as only on the other cluster carry their partition count, replication factor and explicitly-set configs, so the report can be handed straight to create_topic.
This tool creates and changes nothing. To create the missing topics, pass them to create_topic, which previews them against the broker first.
Only configs a topic sets for itself are compared. Two clusters may carry different broker defaults, and comparing inherited values would report every topic as different. Internal topics are excluded unless include_internal is set.
Topic listings come from the client's metadata cache, so a topic created within the last few seconds may still be reported as missing. Repeat the comparison after a moment rather than creating it twice.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | Yes | The clusters to compare against, 1 to 100 of them. Comparing one cluster is an array of length one. Results follow this order and an unreachable cluster is reported against its own item. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| atomic | Yes | ||
| failed | Yes | ||
| applied | Yes | ||
| results | Yes | ||
| succeeded | Yes |