You need to enable JavaScript to run this app.
文档中心
消息队列 RocketMQ版

消息队列 RocketMQ版

复制全文
下载 pdf
Group管理
CreateGroup - 创建 Group
复制全文
下载 pdf
CreateGroup - 创建 Group
调用 CreateGroup 接口创建一个新的消费组(Group)。
使用说明
在消息队列 RocketMQ版中,您需要创建 Group,并通过 Group ID 标识不同类别的生产者或消费者。
  • 每个实例的 Topic 数量配额与实例规格有关,例如各个规格实例可创建的 Topic 数量请参考产品规格
  • 消费者必须配置 Group ID,生产者可以忽略 Group ID 配置。
  • 目前支持的客户端协议为 TCP。
注意事项
请求频率:该接口请求频率限制为 20 次/秒;单用户请求频率限制为 4 次/秒
调试
API Explorer
您可以通过 API Explorer 在线发起调用,无需关注签名生成过程,快速获取调用结果。
请求参数
下方仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数
Action string 必选 示例值:CreateGroup
要执行的操作,取值:CreateGroup。
Version string 必选 示例值:2023-01-01
API的版本,取值:2023-01-01。
ConsumeMessageOrderly boolean 可选 示例值:false
是否顺序消费。
RetryMaxTimes integer 可选 示例值:16
消费失败重试次数。
InstanceId string 必选 示例值:rbtmq-6033c8a0****
实例 ID。
GroupId string 必选 示例值:my_group
Group 的 ID。
  • 长度限制为 7~120 个字符,只能包含字母、数字、短划线(-)或下划线(_)。
  • 推荐以 GID- 或 GID_ 开头。
说明
  • 创建 Group 后无法修改 ID,请谨慎设置。
  • 对于 2023 年 06 月 05 日及之前创建的 RocketMQ 实例,Group 名称不可超过 93 个字符。禁用词列表请参考创建 Group
GroupType string 必选 示例值:TCP
Group 的协议标识,用于备注该 Group 的生产消费协议类型。可指定为 TCP。
Description string 可选 示例值:test
Group 的简单描述。
返回参数
本接口无特有的返回参数。更多信息请见返回结构
请求示例
POST /?Action=CreateGroup&Version=2023-01-01 HTTP/1.1
Host: rocketmq.cn-beijing.volcengineapi.com
Content-Type: application/json; charset=UTF-8
X-Date: 20260112T033844Z
X-Content-Sha256: 287e874e******d653b44d21e
Authorization: HMAC-SHA256 Credential=Adfks******wekfwe/20260112/cn-beijing/RocketMQ/request, SignedHeaders=host;x-content-sha256;x-date, Signature=47a7d934ff7b37c03938******cd7b8278a40a1057690c401e92246a0e41085f
{
"InstanceId": "rbtmq-6033c8a0****",
"GroupId": "my_group",
"GroupType": "TCP"
}
返回示例
{
"ResponseMetadata": {
"RequestId": "2026011211385023804316115331****",
"Action": "CreateGroup",
"Version": "2023-01-01",
"Service": "RocketMQ",
"Region": "cn-beijing"
},
"Result": {}
}
错误码
下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。
状态码
错误码
错误信息
说明
200
OK
OK
成功。
400
InvalidParameter
The specified parameter %s is not valid.
参数值%s无效,请检查后重试。
400
InvalidPara
The specified parameter is not valid.
参数值无效。
400
UnsupportedParameter
The specified parameter %s is unsupported.
不支持%s参数。
400
MissingParameter
The request body is missing a required parameter %s.
缺少%s参数。
400
OperationDenied.InvalidRequest
The request that you specified is not valid.
请求异常,请检查后重试。
400
QuotaExceeded.GroupNumber
The number of group exceeds the limit.
Group 数量超出上限。
400
InvalidGroupId.AlreadyExists
The specified group name already exists.
Group 名称已存在。
403
OperationDenied.AccountNotAuthorized
You are not authorized to perform this operation.
您不具备相关权限,请授权或切换账号后重试。
403
OperationDenied.InvalidInstanceStatus
The operation is not valid for the current status of the instance.
当前实例状态不允许执行该操作。
403
OperationDenied.VersionUnsupported
The current instance version does not support this operation.Please upgrade the instance and try again.
当前实例版本不支持指定操作,请升级实例后再试。
404
InvalidInstanceId.NotFound
The specified Instance ID does not exist.
实例不存在。
500
InternalError
The request failed due to some unknown error, exception or failure.
内部错误,请稍后再试。
500
ServerInternalError
The request failed due to some unknown error, exception or failure.
服务内部错误。
500
ResourceIsBusy
The resource is busy now, please try again later.
资源繁忙,可能由于指定资源正在被访问或回收。
503
ServiceUnavailable
The request failed due to a temporary failure of the server.
当前服务暂时不可用。
最近更新时间:2026.02.13 18:31:52
这个页面对您有帮助吗?
有用
有用
无用
无用