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 ,

The token used to view data of the next page.

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 AAAATzkBMTg4MDc3MDg2OTAyMzQyMAF0ZXN0AXF1ZXVlLXJhYmJpdC1zcHJpbmdib290LWFkdmFuY2U1ATc3NjMxNjIwATE1OTEzNTA5MDkzMDkBrWuX5aAiG4ytL5ffWi0HBUjdleo=

The token used to view data of the next page.

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.