Membuat kelompok konsumen untuk ApsaraMQ for RocketMQ. Kelompok konsumen adalah kelompok penyeimbang beban yang berisi beberapa konsumen dengan perilaku konsumsi yang sama. Konsumen harus menentukan kelompok konsumen dan topik terkait untuk berlangganan Paket.
Deskripsi operasi
The Alibaba Cloud OpenAPI is a management API used to manage and query Alibaba Cloud service resources. Integrate this API for management purposes only. Do not use this API for core data links that send and receive messages. This can introduce risks to your data links.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
rocketmq:CreateConsumerGroup |
create |
*ConsumerGroup
|
None | None |
Sintaks permintaan
POST /instances/{instanceId}/consumerGroups/{consumerGroupId} HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| instanceId |
string |
Yes |
ID instans tempat kelompok konsumen berada. |
rmq-cn-7e22ody**** |
| consumerGroupId |
string |
Yes |
ID kelompok konsumen yang ingin Anda buat. ID ini digunakan untuk mengidentifikasi kelompok konsumen dan harus unik secara global. Nilai harus memenuhi persyaratan berikut:
Untuk informasi lebih lanjut tentang karakter yang dicadangkan, lihat Batas parameter. |
GID_test_groupId |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
Badan permintaan. |
|
| remark |
string |
No |
The remarks on the consumer group. |
This is the remark for test. |
| deliveryOrderType |
string |
Yes |
The delivery order of the consumer group. Valid values:
Valid values:
|
Concurrently |
| consumeRetryPolicy |
object |
Yes |
The retry policy for the consumer group. For more information, see Message retry. |
|
| maxRetryTimes |
integer |
No |
The maximum number of retries. |
16 |
| retryPolicy |
string |
Yes |
The type of the retry policy. For more information, see Message retry. Valid values:
Valid values:
|
DefaultRetryPolicy |
| deadLetterTargetTopic |
string |
No |
The dead-letter topic. If a consumer fails to consume a message after the maximum number of retries, the message is delivered to a dead-letter topic. You can then perform business recovery or backtrace the message. For more information, see Message retry and dead-letter messages. |
DLQ_mqtest |
| fixedIntervalRetryTime |
integer |
No |
The fixed retry interval. Unit: seconds. This parameter is valid only if you set the retry policy to FixedRetryPolicy. Valid values:
|
10 |
| maxReceiveTps |
integer |
No |
The maximum TPS for message consumption. |
1000 |
| messageModel |
string |
No |
The consumption mode. Valid values:
|
LITE_SELECTIVE |
| topicName |
string |
No |
The name of the lite topic that the consumer group subscribes to. This parameter is required if you set messageModel to LITE_SELECTIVE. |
liteTopicTest |
| exclusive |
boolean |
No |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
Result<boolean> |
||
| requestId |
string |
The request ID. Each request has a unique ID. You can use this ID to troubleshoot and locate issues. |
AF9A8B10-C426-530F-A0DD-96320B39**** |
| success |
boolean |
Indicates whether the call was successful. |
true |
| data |
boolean |
The data returned. |
true |
| code |
string |
The error code. |
InvalidConsumerGroupId |
| message |
string |
The error message. |
Parameter consumerGroupId is invalid. |
| httpStatusCode |
integer |
The HTTP status code. |
400 |
| dynamicCode |
string |
The dynamic error code. |
ConsumerGroupId |
| dynamicMessage |
string |
The dynamic error message. |
consumerGroupId |
Contoh
Respons sukses
JSONformat
{
"requestId": "AF9A8B10-C426-530F-A0DD-96320B39****",
"success": true,
"data": true,
"code": "InvalidConsumerGroupId",
"message": "Parameter consumerGroupId is invalid.",
"httpStatusCode": 400,
"dynamicCode": "ConsumerGroupId",
"dynamicMessage": "consumerGroupId"
}
Kode kesalahan
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.