Querying a Topic in a Kafka Instance
Function
This API is used to query details about a topic in a Kafka instance.
Request
Request parameters
None.
Example request
None.
Response
Response parameters
Table 2 describes the response parameter.
Parameter |
Type |
Description |
---|---|---|
total |
Integer |
Total number of topics. |
size |
Integer |
Maximum number of records to be displayed on a page. |
remain_partitions |
Integer |
Number of remaining partitions. |
max_partitions |
Integer |
Total number of partitions. |
topics |
Array |
List of topics. |
Parameter |
Type |
Description |
---|---|---|
policiesOnly |
Boolean |
Whether this policy is the default policy. |
id |
String |
Topic name. |
replication |
Integer |
Number of replicas, which is configured to ensure data reliability. |
partition |
Integer |
Number of topic partitions, which is used to set the number of concurrently consumed messages. |
retention_time |
Integer |
Retention period of a message. |
sync_replication |
Boolean |
Whether to enable synchronous replication. After this function is enabled, the acks parameter on the producer client must be set to –1. Otherwise, this parameter does not take effect. By default, synchronous replication is disabled. |
sync_message_flush |
Boolean |
Whether synchronous flushing is enabled. Synchronous flushing compromises performance. |
external_configs |
Object |
Extended configuration. |
topic_type |
Integer |
Topic type. |
Example response
{ "count": 1, "topics": [ { "id": "topic-test", "replication": 3, "partition": 4, "retention_time": 72, "sync_replication": "false", "sync_message_flush": "false" } ] }
Status Code
Table 4 describes the status code of successful operations. For details about other status codes, see Status Code.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot