Querying Consumer Group Details

This API is out-of-date and may not be maintained in the future. Please use the API described in Querying Consumer Group Details .

URI

GET /v1.0/{project_id}/instances/{instance_id}/manage/groups/{group}

The following table describes the parameters.

Table 1 Parameters

Parameter

Type

Mandatory

Description

project_id

String

Yes

Project ID.

instance_id

String

Yes

Instance ID.

group

String

Yes

Consumer group name.

Request

Request parameters

None.

Example request

None.

Response

Response parameters

Table 2 describes the response parameters.

Table 2 Response parameters

Parameter

Type

Description

group_id

String

Consumer group name.

state

String

Consumer group status. The value can be:

  • Dead: The consumer group has no members and no metadata.
  • Empty: The consumer group has metadata but has no member.
  • PreparingRebalance: The consumer group is to be rebalanced.
  • CompletingRebalance: All members have jointed the group.
  • Stable: Members in the consumption group can consume messages normally.

coordinator_id

Integer

Coordinator ID.

members

Array of object members

Consumer list. For details, see Table 3.

group_message_offsets

Array of group_offsets

Consumer offset. For details, see Table 4.

assignment_strategy

String

Partition assignment policy.

Table 3 members parameters

Parameter

Type

Description

host

String

Consumer address.

assignment

Array of object assignment

Details about the partition assigned to the consumer. For details, see Table 5.

member_id

String

Consumer group ID.

client_id

String

Client ID.

Table 4 group_message_offsets parameters

Parameter

Type

Description

topic

String

Topic name.

partition

Integer

Partition number.

message_current_offset

Long

Consumption progress.

message_log_end_offset

Long

Log end offset (LEO).

lag

Long

Number of remaining messages that can be retrieved, that is, the number of accumulated messages.

Table 5 assignment parameters

Parameter

Type

Description

topic

String

Topic name.

partitions

Array of integer

Partition list.

Example response

{
    "group": {
        "members": [
            {
                "host": "/172.31.1.102",
                "assignment": [
                    {
                        "topic": "test",
                        "partitions": [
                            0,
                            1,
                            2
                        ]
                    }
                ],
                "member_id": "consumer-1-6b8ee551-d499-47d4-9beb-ba1527496785",
                "client_id": "consumer-1"
            }
        ],
        "state": "STABLE",
        "group_id": "test-consumer-group",
        "coordinator_id": 2,
        "group_message_offsets": [
            {
                "partition": 0,
                "lag": 31396,
                "topic": "test",
                "message_current_offset": 935,
                "message_log_end_offset": 32331
            },
            {
                "partition": 0,
                "lag": 0,
                "topic": "aaaa",
                "message_current_offset": 0,
                "message_log_end_offset ": 0
            },
            {
                "partition": 1,
                "lag": 31279,
                "topic": "test",
                "message_current_offset": 1058,
                "message_log_end_offset ": 32337
            },
            {
                "partition": 1,
                "lag": 0,
                "topic": "aaaa",
                "message_current_offset": 0,
                "message_log_end_offset": 0
            },
            {
                "partition": 2,
                "lag": 31603,
                "topic": "test",
                "message_current_offset": 739,
                "message_log_end_offset": 32342
            }
        ],
        "assignment_strategy": "range"
    }
}