Get topic details - GetUKafkaTopicInfo
Overview
Retrieve detailed information of the specified topic, including Topic properties, message dynamics, and partition status.
Definition
Public Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
Action | string | Corresponding API command name, the current API is GetUKafkaTopicInfo . | Yes |
PublicKey | string | The user’s public key can be obtained from Console | Yes |
Signature | string | User signature generated based on public key and API command, see Signature Algorithm | Yes |
Request Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
Region | string | Region. See List of Regions and Availability Zones | Yes |
Zone | string | Availability Zone. See Availability Zone List | Yes |
ProjectId | string | Project ID. If not filled in, the default project is used, and the sub-account must be filled in. Please refer to the GetProjectList interface. | No |
ClusterInstanceId | string | UKafka Cluster ID | Yes |
Topic | string | Specified Topic | Yes |
Response Field
Field Name | Type | Description Information | Required |
---|---|---|---|
RetCode | int | Return status code. If it is 0, it means successful return. If it is not 0, it means failure. | Yes |
Action | string | Operation command name. | Yes |
Message | string | Returns an error message, providing detailed description when RetCode is non-zero. | No |
Partitions | object | topic partition information | Yes |
TopicProperty | TopicProperty | topic attribute | Yes |
MessageState | MessageState | topic Message Updates | Yes |
Data Model
TopicProperty
Field Name | Type | Description Information | Required |
---|---|---|---|
NumOfReplica | int | Number of Replicas | No |
NumOfPartition | int | Number of Partitions | No |
NumOfBroker | int | Number of brokers | No |
NumOfOccupyBroker | int | Number of brokers occupied | No |
UnderReplicasPer | float | Lagging Replica Proportion | No |
BrokerSpreadPer | float | Coverage rate of broker for topic | No |
BrokerSkewedPer | float | Slope of the broker for the topic | No |
PreferredReplicasPer | float | Primary Replica Occupancy Rate | No |
SumOfPartitionOffset | int | Sum of the topic’s offset | No |
SumTopicUsage | int | Sum of disk usage for the topic | No |
MessageState
Field Name | Type | Description Information | Required |
---|---|---|---|
LastUpdateTime | int | Last update time (timestamp) on topic | No |
BytesInPerSec | float | Topic Inflow Message Rate Per Minute | No |
BytesOutPerSec | float | topic Outgoing Message Rate per Minute | No |
MessagesInPerSec | float | Topic Number of Messages Inflow per Minute | No |
Example
Request Example
https://api.dezai.com/?Action=GetUKafkaTopicInfo
&Zone=cn-bj2-02
&ClusterInstanceId=ukafka-asje3q
&Topic=foo
&Region=VjMeLUzs
&ProjectId=AQtYNwBR
Response Example
{
"Action": "GetUKafkaTopicInfoResponse",
"MessageState": {
"BytesInPerSec": 58.74732451878237,
"BytesOutPerSec": 58.06401734087217,
"LastUpdateTime": 1537340210000,
"MessagesInPerSec": 1.2239025941412993
},
"Partitions": {
"0": {
"isr": [
3,
2,
1
],
"leader": 3,
"partition": 0,
"replicas": [
3,
2,
1
],
"topic": "foo",
"usage": 190224
},
"1": {
"isr": [
1,
3,
2
],
"leader": 1,
"partition": 1,
"replicas": [
1,
3,
2
],
"topic": "foo",
"usage": 190672
},
"2": {
"isr": [
2,
1,
3
],
"leader": 2,
"partition": 2,
"replicas": [
2,
1,
3
],
"topic": "foo",
"usage": 190372
}
},
"RetCode": 0,
"TopicProperty": {
"BrokerSkewedPer": 0,
"BrokerSpreadPer": 1,
"PreferredReplicasPer": 1,
"SumOfPartitionOffset": 1773815,
"SumTopicUsage": 571268,
"numOfBroker": 3,
"numOfOccupyBroker": 3,
"numOfPartition": 3,
"numOfReplica": 3,
"underReplicasPer": 0
}
}