All Products
Search
Document Center

ApsaraMQ for RocketMQ:GetConsumerGroup

Last Updated:Jun 10, 2026

Mengambil detail kelompok konsumen tertentu.

Deskripsi operasi

Penting

The Alibaba Cloud OpenAPI is a control plane API for managing and querying cloud resources. We recommend that you integrate this API for control plane tasks only. Do not rely on OpenAPI for core data paths that send and receive messages, as this can introduce risks to your service.

Coba sekarang

Coba API ini di OpenAPI Explorer tanpa perlu penandatanganan manual. Panggilan yang berhasil akan secara otomatis menghasilkan contoh kode SDK sesuai dengan parameter Anda. Unduh kode tersebut dengan kredensial bawaan yang aman untuk penggunaan lokal.

Test

RAM authorization

Tabel berikut menjelaskan otorisasi yang diperlukan untuk memanggil API ini. Anda dapat menentukannya dalam kebijakan Resource Access Management (RAM). Kolom pada tabel dijelaskan sebagai berikut:

  • Action: Aksi yang dapat digunakan dalam elemen Action pada pernyataan kebijakan izin RAM untuk memberikan izin guna melakukan operasi tersebut.

  • API: API yang dapat Anda panggil untuk melakukan aksi tersebut.

  • Access level: Tingkat akses yang telah ditentukan untuk setiap API. Nilai yang valid: create, list, get, update, dan delete.

  • Resource type: Jenis resource yang mendukung otorisasi untuk melakukan aksi tersebut. Ini menunjukkan apakah aksi tersebut mendukung izin tingkat resource. Resource yang ditentukan harus kompatibel dengan aksi tersebut. Jika tidak, kebijakan tersebut tidak akan berlaku.

    • Untuk API dengan izin tingkat resource, jenis resource yang diperlukan ditandai dengan tanda bintang (*). Tentukan Nama Sumber Daya Alibaba Cloud (ARN) yang sesuai dalam elemen Resource pada kebijakan.

    • Untuk API tanpa izin tingkat resource, ditampilkan sebagai All Resources. Gunakan tanda bintang (*) dalam elemen Resource pada kebijakan.

  • Condition key: Kunci kondisi yang didefinisikan oleh layanan. Kunci ini memungkinkan kontrol granular, berlaku baik hanya untuk aksi maupun untuk aksi yang terkait dengan resource tertentu. Selain kunci kondisi spesifik layanan, Alibaba Cloud menyediakan serangkaian common condition keys yang berlaku di semua layanan yang didukung RAM.

  • Dependent action: Aksi dependen yang diperlukan untuk menjalankan aksi tersebut. Untuk menyelesaikan aksi tersebut, pengguna RAM atau role RAM harus memiliki izin untuk melakukan semua aksi dependen.

Action

Access level

Resource type

Condition key

Dependent action

rocketmq:GetConsumerGroup

get

*ConsumerGroup

acs:rocketmq:{#regionId}:{#accountId}:instance/{#InstanceId}/consumergroup/{#ConsumerGroupId}

None None

Sintaks permintaan

GET /instances/{instanceId}/consumerGroups/{consumerGroupId} HTTP/1.1

Path Parameters

Parameter

Type

Required

Description

Example

instanceId

string

Yes

ID instans yang berisi kelompok konsumen.

rmq-cn-7e22ody****

consumerGroupId

string

Yes

ID kelompok konsumen.

CID-TEST

Parameter permintaan

Parameter

Type

Required

Description

Example

Tidak ada parameter yang diperlukan.

Elemen respons

Element

Type

Description

Example

object

The response object.

requestId

string

The unique ID for the request. Use this ID to troubleshoot issues.

C7F94090-3358-506A-97DC-34BC803C****

success

boolean

Indicates whether the call was successful.

true

data

object

The returned data.

regionId

string

The ID of the region to which the instance belongs.

cn-hangzhou

instanceId

string

The ID of the instance to which the consumer group belongs.

rmq-cn-7e22ody****

consumerGroupId

string

The ID of the consumer group.

CID-TEST

status

string

The state of the consumer group.

Valid values:

  • RUNNING :

    The consumer group is running.

  • CREATING :

    The consumer group is being created.

RUNNING

remark

string

The remarks on the consumer group.

This is the remark for test.

createTime

string

The time when the consumer group was created.

2022-08-01 20:05:50

updateTime

string

The time when the consumer group was last updated.

2022-08-01 20:05:50

deliveryOrderType

string

The message delivery order for the consumer group.

Valid values:

  • Concurrently :

    Concurrent delivery

  • Orderly :

    Orderly delivery

Concurrently

consumeRetryPolicy

object

The consumption retry policy. For more information, see Consumption retry.

retryPolicy

string

The type of the retry policy.

Valid values:

  • FixedRetryPolicy :

    Messages are retried at a fixed interval.

  • DefaultRetryPolicy :

    Messages are retried with backoff.

DefaultRetryPolicy

maxRetryTimes

integer

The maximum number of retries.

16

deadLetterTargetTopic

string

The dead-letter topic.

If a message fails to be consumed after the maximum number of retries, it is sent to a dead-letter topic. You can use the dead-letter topic for business recovery or message tracing. For more information, see Consumption retry and dead-letter messages.

DLQ_mqtest

fixedIntervalRetryTime

integer

The fixed retry interval. Unit: seconds. The valid range is:

  • Concurrently: 10 to 1800

  • Orderly: 1 to 600

20

maxReceiveTps

integer

The maximum transactions per second (TPS) for message consumption.

2000

messageModel

string

The consumption mode. Valid values:

  • CLUSTERING: clustering

  • BROADCASTING: broadcasting

LITE_SELECTIVE

topicName

string

The name of the topic.

test1

exclusive

boolean

Indicates whether exclusive consumption is enabled.

false

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": "C7F94090-3358-506A-97DC-34BC803C****",
  "success": true,
  "data": {
    "regionId": "cn-hangzhou",
    "instanceId": "rmq-cn-7e22ody****",
    "consumerGroupId": "CID-TEST",
    "status": "RUNNING",
    "remark": "This is the remark for test.",
    "createTime": "2022-08-01 20:05:50",
    "updateTime": "2022-08-01 20:05:50",
    "deliveryOrderType": "Concurrently",
    "consumeRetryPolicy": {
      "retryPolicy": "DefaultRetryPolicy",
      "maxRetryTimes": 16,
      "deadLetterTargetTopic": "DLQ_mqtest",
      "fixedIntervalRetryTime": 20
    },
    "maxReceiveTps": 2000,
    "messageModel": "LITE_SELECTIVE",
    "topicName": "test1",
    "exclusive": false
  },
  "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.