Distributed Message Service RocketMQ

Viewing the Subscription Information of a Topic

2024-07-08 08:46:49

API Introduction

Used to view the subscription information of a topic.

API Restrictions

None.

URl

GET       https://[endpoint]/v2/topic/subDetail

Request Parameters

Request Parameters

Required or   Not

Position

Parameter Type

Description

prodInstId

Yes

url

String

Instance   ID

topicName

Yes

url

Integer

Topic   Name

Response Parameter

Response Parameter

Parameter Type

Description

statusCode

String

The   status code of the interface on the system layer. Success: 800; failure: 900.

message

String

Status   Description

returnObj

String

Return   the object. The parameters included in this parameter are described in the   comments in Response Examples.

Description of Return Value returnObj

Response Parameter

Parameter Type

Description

data

json

Topic   Subscription Data

Description of Return Value data

Response Parameter

Parameter Type

Description

subscriptionDataList

List

Topic   Subscription Info

topic

String

Topic   Name

prodInstId

String

Instance   ID

Description of Return Value subscriptionDataList

Response Parameter

Parameter Type

Description

consumerGroup

String

Subscription   Group

subString

String

Subscription   Information

 

Sample Request

GET       https://[endpoint]/v2/topic/subDetail?prodInstId=70687660456281088&topicName=test

Examples of a Successful Response

{

    "returnObj":{

        "data":{

            "subscriptionDataList":[

                {

                    "consumerGroup":"group",

                    "subString":"*"

                }

            ],

            "topic":"test",

            "prodInstId":"mq_test"

        }

    },

    "message":"success",

    "statusCode":800

}

Example of a Failed Response

{

    "returnObj": {},

    "message": "...",

    "statusCode": "900"

}


2Zb6G1Uh3ti2