POST /consumers/{string: group_name}/instances/{string: instance_id}/subscription

Subscribes to the given list of topics or a topic pattern to get dynamically assigned partitions. If a prior subscription exists, it would be replaced by the latest subscription.

Parameters

Table 1. 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>/subscription

Request Example

curl -X POST -H "Content-Type: application/vnd.kafka.v2+json" --data
'{"topics":["/stream:first","/stream:second"]}'
https://localhost:8082/consumers/grouptest/instances/user/subscription

Response Example

HTTP/1.1 204 No Content