Configures the permissions for a consumer group with a specified group ID to read messages.

Usage notes

You can call this operation to configure the permissions for a consumer group to read messages based on a specified region of Message Queue for Apache RocketMQ and a specified group ID. This operation is applicable to scenarios where the clients in a specific group are forbidden from reading messages.

QPS limit

A user can perform a maximum of 10 queries per second (QPS). When the number of calls to this operation per second exceeds the QPS limit, throttling is triggered. If throttling is triggered, your business may be affected. We recommend that you take note of the QPS limit on this operation. For more information, see QPS limit.

Authorization information

By default, only Alibaba Cloud accounts can call this operation. RAM users can call this operation only after these RAM users are granted related permissions. The following table describes the authorization information of this operation. For more information, see Policies and examples.

Operation

Action

Resource with a namespace

Resource without a namespace

OnsGroupConsumerUpdate

mq:UpdateGroupConsumer

acs:mq:*:*:{instanceId}%{groupId}

acs:mq:*:*:{groupId}

Request parameters

Parameter Type Required Example Description
Action String Yes OnsGroupConsumerUpdate

The operation that you want to perform. Set the value to OnsGroupConsumerUpdate.

GroupId String Yes GID_test_groupId

The ID of the group for which you want to configure the permissions to read messages.

ReadEnable Boolean Yes true

Specifies whether to authorize the consumer group with the specified group ID to read messages. Valid values:

  • true: Authorize the consumer group with the specified group ID to read messages.
  • false: Do not authorize the consumer group with the specified group ID to read messages.

Default value: true.

InstanceId String Yes MQ_INST_111111111111_DOxxxxxx

The ID of the instance where the group you want to configure resides.

Response parameters

Parameter Type Example Description
RequestId String A07E3902-B92E-44A6-B6C5-6AA111111****

The ID of the request. This is a common parameter. Each request has a unique ID. This facilitates troubleshooting and fault locating.

Examples

Sample requests

http(s)://ons.cn-hangzhou.aliyuncs.com/?Action=OnsGroupConsumerUpdate
&GroupId=GID_test_groupId
&InstanceId=MQ_INST_111111111111_DOxxxxxx
&ReadEnable=true
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<OnsGroupConsumerUpdateResponse>
<RequestId>A07E3902-B92E-44A6-B6C5-6AA111111****</RequestId>
</OnsGroupConsumerUpdateResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "A07E3902-B92E-44A6-B6C5-6AA111111****"
}

Error codes

For a list of error codes, visit the API Error Center.