Queries the consumers who subscribe to a queue.
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | ListQueueConsumers | The operation that you want to perform. Set the value to ListQueueConsumers. |
InstanceId | String | Yes | 188077086902*** | The ID of the instance. |
Queue | String | Yes | queue-rabbit-springboot-advance5 | The name of the queue. |
RegionId | String | Yes | cn-hangzhou | The ID of the region. |
VirtualHost | String | Yes | test | The name of the vhost. |
NextToken | String | No | caeba0bbb2be03f84eb48b699f0a**** | The token that marks the end position of the previous returned page. Call the operation again by using the value of the NextToken parameter returned by the previous request to obtain the next set of data. Leave this parameter empty the first time you call this operation. If all results have been returned, the value of NextToken in the response parameter is empty. |
QueryCount | Integer | No | 1 | The number of data entries to query. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
Data | Struct | The returned data. | |
Consumers | Array of QueueConsumerVO | An array of consumers. | |
ConsumerTag | String | sgen-1 | The consumer tag. |
MaxResults | Integer | 1 | The maximum number of returned result entries. |
NextToken | String | caebacccb2be03f84eb48b699f0a**** | The token that marks the end of the current returned page. If this parameter is empty, it indicates that you have retrieved all the data. |
RequestId | String | 4409B7D5-E4EC-4EB5-804A-385DCDFCD*** | The ID of the request. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=ListQueueConsumers
&InstanceId=188077086902***
&Queue=queue-rabbit-springboot-advance5
&RegionId=cn-hangzhou
&VirtualHost=test
&<Common request parameters>
Sample success responses
XML
format
<ListQueueConsumersResponse>
<RequestId>4409B7D5-E4EC-4EB5-804A-385DCDFCD***</RequestId>
<Data>
<NextToken>AAAATzkBMTg4MDc3MDg2OTAyMzQyMAF0ZXN0AXF1ZXVlLXJhYmJpdC1zcHJpbmdib290LWFkdmFuY2U1ATc3NjMxNjIwATE1OTEzNTA5MDkzMDkBrWuX5aAiG4ytL5ffWi0HBUjdleo=</NextToken>
<MaxResults>1</MaxResults>
<Consumers>
<ConsumerTag>sgen-1</ConsumerTag>
</Consumers>
</Data>
</ListQueueConsumersResponse>
JSON
format
{
"RequestId": "4409B7D5-E4EC-4EB5-804A-385DCDFCD***",
"Data": {
"NextToken": "AAAATzkBMTg4MDc3MDg2OTAyMzQyMAF0ZXN0AXF1ZXVlLXJhYmJpdC1zcHJpbmdib290LWFkdmFuY2U1ATc3NjMxNjIwATE1OTEzNTA5MDkzMDkBrWuX5aAiG4ytL5ffWi0HBUjdleo=",
"MaxResults": 1,
"Consumers": {
"ConsumerTag": "sgen-1"
}
}
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
500 | InternalError | The request processing has failed due to some unknown error. | The error message returned because an internal error has occurred. Try again later. |
For a list of error codes, visit the API Error Center.