Queries the message consumption statistics for a specified group ID over a period of time.
Operation description
-
A statistical curve of the total number of consumed messages
-
A statistical curve of the Transaction Per Second (TPS) for message consumption
If your application has a small and uneven volume of messages, querying by TPS may not return meaningful data. In this case, you can query the total number of consumed messages.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
mq:QueryTrendGroupOutputTps |
get |
Group
Group
|
None |
|
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| GroupId |
string |
Yes |
The ID of the group to query. |
GID_test |
| Topic |
string |
Yes |
The name of the topic to query. |
test |
| BeginTime |
integer |
Yes |
The beginning of the time range to query. This value is a UNIX timestamp in milliseconds. |
1570852800000 |
| EndTime |
integer |
Yes |
The end of the time range to query. This value is a UNIX timestamp in milliseconds. |
1570868400000 |
| Type |
integer |
Yes |
The type of information to query. Valid values:
|
0 |
| InstanceId |
string |
No |
The ID of the instance to which the group belongs. |
MQ_INST_111111111111_DOxxxxxx |
| Period |
integer |
No |
The sampling period. Unit: minutes. Valid values: 1, 5, and 10. |
10 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The ID of the request. This is a common parameter. Each request has a unique ID that you can use to troubleshoot issues. |
CE57AEDC-8FD2-43ED-8E3B-1F878077**** |
| Data |
object |
The returned data. |
|
| Records |
object |
||
| StatsDataDo |
array<object> |
The data points. |
|
|
object |
|||
| Y |
number |
The y-axis, which indicates the data value. The data can be the TPS or the total number of messages. |
0 |
| X |
integer |
The x-axis, which indicates the timestamp in milliseconds. |
1570867800000 |
| XUnit |
string |
The unit of the x-axis. The time is measured in ms. |
ms |
| YUnit |
string |
The unit of the y-axis. The value can be the number of consumed messages (msg) or the TPS for message consumption (msg/min). |
msg |
| Title |
string |
The name of the table. |
TopicXXX@GID_XXXReceive Trend Chart |
Examples
Success response
JSON format
{
"RequestId": "CE57AEDC-8FD2-43ED-8E3B-1F878077****",
"Data": {
"Records": {
"StatsDataDo": [
{
"Y": 0,
"X": 1570867800000
}
]
},
"XUnit": "ms",
"YUnit": "msg",
"Title": "TopicXXX@GID_XXXReceive Trend Chart"
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.