All Products
Document Center


Last Updated: Apr 01, 2019


You can call this operation to query message consumption accumulation for a specific group ID, including message accumulation amount and consumption latency.


Consumption accumulation query is used when the consumption progress of a group ID in the production environment needs to be kept track of, to roughly determine message consumption and latency. You can check not only the message accumulation corresponding to all topics subscribed to under the group ID, but also the message accumulation corresponding to each topic.

To view consumption information corresponding to each online consumer instance under the group ID, call OnsConsumerStatus to query the consumption status.

Request parameters

Name Type Required Description
InstanceId String No The ID of the instance.
PreventCache Long Yes The parameter used for CSRF verification, which can be set to the current system time. Unit: ms
ConsumerId String Yes The group ID of the consumer you want to query.
Detail Boolean No Indicates whether to query details. Valid values:
  • true: Query details.
  • false: Do not query details (default).

Response parameters

Name Type Description
RequestId String A common parameter. Each request has a unique ID.
HelpUrl String A help link.
Data Data The

Fields in Data

Name Type Description
OnLine Boolean Indicates whether consumer instances are online under the group ID. The group ID is online if one of the consumer instances is online. Valid values:
  • true: online
  • false: offline
TotalDiff Long The total message accumulation amount corresponding to all the topics that the group ID subscribed to.
ConsumeTps Float Total TPS at which messages are received by the consumer instance group under the group ID.
LastTimestamp Long The production time of the last message consumed in the consumer instance group under the group ID.
DelayTime Long The maximum message consumption latency in the consumer instance group under the group ID.
DetailInTopicList List(OnsConsumerAccumulateResponse.Data.DetailInTopicDo) Details about each topic.

Fields in DetailInTopicList

Name Type Description
Topic String The name of the topic.
TotalDiff Long The consumption accumulation amount corresponding to the topic.
LastTimestamp Long The production time of the last message consumed under the topic.
DelayTime Long The maximum consumption latency of messages sent under the topic.


For more information about sample codes, see API sample code and endpoints.