Queries the statistics on the messages consumed by consumers with a specified group ID.
When the system generates consumption statistics online, you can call this operation to query the following statistics corresponding to specified group ID:
- The statistical curve of total messages consumed
- The TPS statistical curve of messages consumed
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | OnsTrendGroupOutputTps |
The operation that you want to perform. Set the value to OnsTrendGroupOutputTps. |
BeginTime | Long | Yes | 1570852800000 |
The beginning of the time range to query. Unit: milliseconds. |
EndTime | Long | Yes | 1570868400000 |
The end of the time range to query. Unit: milliseconds. |
GroupId | String | Yes | GID_test |
The consumer group ID that you want to query. |
Topic | String | Yes | test |
The name of the topic that you want to query. |
Type | Integer | Yes | 0 |
The type of statistics that you want to query. Valid values:
|
InstanceId | String | Yes | MQ_INST_111111111111_DOxxxxxx |
The ID of the Message Queue for Apache RocketMQ instance corresponding to the consumer group ID. This parameter is required for instances with separate namespaces. |
Period | Long | No | 10 |
The sampling period. Unit: minutes. Valid values: 1, 5, and 10. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
Data | Struct |
The returned data set. |
|
Records | Array |
The data set that includes more detailed information. |
|
StatsDataDo | |||
X | Long | 1570867800000 |
The X axis. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since the epoch time January 1, 1970, 00:00:00 UTC. |
Y | Float | 0 |
The Y axis. It represents the TPS or the message production volume. |
Title | String | MQ_INST_111111111111_DOxxxxxx%test@MQ_INST_111111111111_DOxxxxxx%GID_test total shipping volume trend chart |
The name of the table that lists the historical message consumption TPS or volume in the specified time range. |
XUnit | String | time |
The time in the X axis. The time is displayed in the UNIX timestamp format. Unit: milliseconds. |
YUnit | String | msg |
The number of messages consumed. |
RequestId | String | CE57AEDC-8FD2-43ED-8E3B-1F8780779FE2 |
The ID of the request. |
Examples
Sample requests
http(s)://[Endpoint]/? Action=OnsTrendGroupOutputTps
&BeginTime=1570852800000
&EndTime=1570868400000
&GroupId=GID_test
&Topic=test
&Type=0
&<Common request parameters>
Sample success responses
XML
format
<OnsTrendGroupOutputTpsResponse>
<Data>
<Records>
<StatsDataDo>
<Y>0</Y>
<X>1570852800000</X>
</StatsDataDo>
<StatsDataDo>
<Y>0</Y>
<X>1570853400000</X>
</StatsDataDo>
<StatsDataDo>
<Y>0</Y>
<X>1570854000000</X>
</StatsDataDo>
<StatsDataDo>
<Y>0</Y>
<X>1570854600000</X>
</StatsDataDo>
<StatsDataDo>
<Y>0</Y>
<X>1570855200000</X>
</StatsDataDo>
<StatsDataDo>
<Y>0</Y>
<X>1570860600000</X>
</StatsDataDo>
<StatsDataDo>
<Y>0</Y>
<X>1570861200000</X>
</StatsDataDo>
<StatsDataDo>
<Y>0</Y>
<X>1570861800000</X>
</StatsDataDo>
<StatsDataDo>
<Y>0</Y>
<X>1570862400000</X>
</StatsDataDo>
<StatsDataDo>
<Y>0</Y>
<X>1570863000000</X>
</StatsDataDo>
<StatsDataDo>
<Y>0</Y>
<X>1570863600000</X>
</StatsDataDo>
<StatsDataDo>
<Y>0</Y>
<X>1570864200000</X>
</StatsDataDo>
<StatsDataDo>
<Y>1</Y>
<X>1570864800000</X>
</StatsDataDo>
<StatsDataDo>
<Y>0</Y>
<X>1570865400000</X>
</StatsDataDo>
<StatsDataDo>
<Y>0</Y>
<X>1570866000000</X>
</StatsDataDo>
<StatsDataDo>
<Y>0</Y>
<X>1570866600000</X>
</StatsDataDo>
<StatsDataDo>
<Y>0</Y>
<X>1570867200000</X>
</StatsDataDo>
<StatsDataDo>
<Y>0</Y>
<X>1570867800000</X>
</StatsDataDo>
<StatsDataDo>
<Y>0</Y>
<X>1570868400000</X>
</StatsDataDo>
</Records>
<XUnit>time</XUnit>
<YUnit>quantity</YUnit>
<Title>MQ_INST_111111111111_DOxxxxxx%test@MQ_INST_111111111111_DOxxxxxx%GID_test total shipping volume trend chart</Title>
</Data>
<RequestId>CE57AEDC-8FD2-43ED-8E3B-1F8780779FE2</RequestId>
</OnsTrendGroupOutputTpsResponse>
JSON
format
{
"Data": {
"Records": {
"StatsDataDo": [
{
"Y": 0,
"X": 1570852800000
},
{
"Y": 0,
"X": 1570853400000
},
{
"Y": 0,
"X": 1570854000000
},
{
"Y": 0,
"X": 1570854600000
},
{
"Y": 0,
"X": 1570855200000
},
{
"Y": 0,
"X": 1570860600000
},
{
"Y": 0,
"X": 1570861200000
},
{
"Y": 0,
"X": 1570861800000
},
{
"Y": 0,
"X": 1570862400000
},
{
"Y": 0,
"X": 1570863000000
},
{
"Y": 0,
"X": 1570863600000
},
{
"Y": 0,
"X": 1570864200000
},
{
"Y": 1,
"X": 1570864800000
},
{
"Y": 0,
"X": 1570865400000
},
{
"Y": 0,
"X": 1570866000000
},
{
"Y": 0,
"X": 1570866600000
},
{
"Y": 0,
"X": 1570867200000
},
{
"Y": 0,
"X": 1570867800000
},
{
"Y": 0,
"X": 1570868400000
}
]
},
"XUnit": "time",
"YUnit": "quantity",
"Title": "MQ_INST_111111111111_DOxxxxxx%test@MQ_INST_111111111111_DOxxxxxx%GID_test total shipping volume trend chart"
},
"RequestId": "CE57AEDC-8FD2-43ED-8E3B-1F8780779FE2"
}
Error codes
For a list of error codes, visit the API Error Center.