Mengkueri statistik tentang Paket yang dipublikasikan ke topik dalam periode pengatur waktu tertentu.
Deskripsi operasi
API operations provided by Alibaba Cloud are used to manage and query resources of Alibaba Cloud services. We recommend that you integrate these API operations only in management systems. Do not use these API operations in the core system of messaging services. Otherwise, system risks may occur.
You can call this operation to query the statistics of messages that are published to a specific topic in a production environment. You can query the number of messages that are published to the topic or the transactions per second (TPS) for message publishing within a specified time range based on your business requirements.
If your application publishes a small number of messages and does not publish messages at specific intervals, we recommend that you query the number of messages that are published to the topic during each sampling period because the statistics of TPS may not show a clear change trend.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
mq:QueryTrendTopicInputTps |
get |
Topic
Topic
|
None |
|
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| Topic |
string |
Yes |
Nama topik yang ingin Anda kueri. |
test |
| BeginTime |
integer |
Yes |
Stempel waktu yang menunjukkan awal rentang pengatur waktu yang akan dikueri. Unit: milidetik. |
1570852800000 |
| EndTime |
integer |
Yes |
Stempel waktu yang menunjukkan akhir rentang pengatur waktu yang akan dikueri. Unit: milidetik. |
1570868400000 |
| Type |
integer |
Yes |
Jenis informasi yang ingin Anda kueri. Nilai valid:
|
0 |
| InstanceId |
string |
No |
ID instans tempat topik yang ingin Anda kueri berada. |
MQ_INST_111111111111_DOxxxxxx |
| Period |
integer |
No |
Periode sampling. Unit: menit. Nilai valid: 1, 5, dan 10. |
10 |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The ID of the request. This parameter is a common parameter. Each request has a unique ID. You can use the ID to troubleshoot issues. |
E213AD8A-0730-4B3D-A35A-340DA47D**** |
| Data |
object |
The data returned. |
|
| Records |
object |
||
| StatsDataDo |
array<object> |
The data set returned based on sampling period. |
|
|
object |
|||
| Y |
number |
The Y axis. This parameter indicates the TPS for message publishing or the number of messages that are published. |
0 |
| X |
integer |
The X axis. The value of this parameter is a UNIX timestamp in milliseconds. |
1570852800000 |
| XUnit |
string |
The unit of the timestamp. |
ms |
| YUnit |
string |
The unit of the Y axis. |
msg |
| Title |
string |
The name of the table. |
TopicXXX Send Trend Chart |
Contoh
Respons sukses
JSONformat
{
"RequestId": "E213AD8A-0730-4B3D-A35A-340DA47D****",
"Data": {
"Records": {
"StatsDataDo": [
{
"Y": 0,
"X": 1570852800000
}
]
},
"XUnit": "ms",
"YUnit": "msg",
"Title": "TopicXXX Send Trend Chart"
}
}
Kode kesalahan
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.