GET /consumers/{string: group_name}/instances/{string: instance_id}/assignments
Retrieves the list of partitions currently assigned to this consumer.
Parameters
Parameter | Description |
---|---|
group_name (string) | Name of the consumer group. |
instance (string) | ID of the consumer instance. |
Syntax
http://<host>:8082/consumers/<group_name>/instances/<consumer_name>/assignments
Request Example
curl -X GET -H "Content-Type: application/vnd.kafka.v2+json"
https://localhost:8082/consumers/grouptest/instances/user/assignments
Response Example
The response JSON object is in the following form:
- partitions – A list of partitions assigned to this consumer.
- partitions[i].topic (string) – Name of the topic.
- partitions[i].partition (int) – Partition ID
{
"partitions": [
{
"topic": "test",
"partition": 0
},
{
"topic": "test",
"partition": 1
}
]
}