You can call this operation to create a consumer group ID.
The group ID is used to publish and subscribe to messages.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | OnsGroupCreate |
The operation that you want to perform. Set the value to OnsGroupCreate. |
GroupId | String | Yes | GID_test_groupId |
The ID of the consumer group that you want to create. The value must meet the following requirements:
Note A group ID cannot be modified after creation.
|
InstanceId | String | Yes | MQ_INST_111111111111_DOxxxxxx |
The ID of the Message Queue for Apache RocketMQ instance corresponding to the group ID that you want to create. |
Remark | String | No | test |
The description of the group ID that you want to create. |
GroupType | String | No | tcp |
The protocol that is applicable to the group ID that you want to create. TCP-based instances cannot be located in the same group with HTTP-based instances. You must create group IDs for TCP-based instances and for HTTP-based instances separately. Valid values:
|
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | A07E3902-B92E-44A6-B6C5-6AA1111111799 |
The ID of the request. This is a common parameter. |
Examples
Sample requests
http(s)://[Endpoint]/? Action=OnsGroupCreate
&GroupId=GID_test_groupId
&InstanceId=MQ_INST_111111111111_DOxxxxxx
&Remark=test
&GroupType=tcp
&<Common request parameters>
Sample success responses
XML
format
<OnsGroupCreateResponse>
<RequestId>A07E3902-B92E-44A6-B6C5-6AA1111111799</RequestId>
</OnsGroupCreateResponse>
JSON
format
{
"RequestId":"A07E3902-B92E-44A6-B6C5-6AA1111111799"
}
Error codes
For a list of error codes, visit the API Error Center.