All Products
Document Center


Last Updated: Mar 28, 2019


You can call this operation to query the total number of messages corresponding to the current topic and the last topic update time.


This operation is used to determine the topic resource usage. The information returned after you call the operation includes the total number of messages corresponding to the topic on the broker and the time when messages were last written.

Request parameters

Name Type Required Description
PreventCache Long Yes The parameter used for CSRF verification, which can be set to the current system time. Unit: ms
InstanceId String No The ID of the instance.
Topic String Yes The name of the topic you want to query.

Response parameters

Name Type Description
RequestId String A common parameter. Each request has a unique ID.
HelpUrl String A help link.
Data OnsTopicStatusResponse.Data The structure of topic data that is queried.

Fields in OnsTopicStatusResponse.Data

Name Type Description
totalCount Long The total number of messages in all partitions under the current topic.
lastTimeStamp Long The time when the current topic was last updated.


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