POST /consumers/{group: string}

Creates a new consumer instance in the consumer group.


Table 1. Parameters
Parameters Description
group_name (string) The name of the consumer group to join.
name (string) Name for the consumer instance, which will be used in URLs for the consumer. This must be unique, at least within the proxy process handling the request. If omitted, falls back on the automatically generated ID. Using automatically generated names is recommended for most use cases.
format (string) The format of consumed messages, which is used to convert messages into a JSON-compatible form. Valid values: “binary”, “avro”, “json”. If unspecified, defaults to “binary”.
auto.offset.reset (string) Sets the auto.offset.reset setting for the consumer. Values: latest, earliest, none
auto.commit.enable (string) Sets the auto.commit.enable setting for the consumer.



Request Example

curl -X POST -H "Content-Type: application/vnd.kafka.v1+json" 
  --data '{"name":"user","format": "binary", "auto.offset.reset": "earliest"}'   

Response Example

The response JSON object is in the following form:
  • instance_id (string) – Unique ID for the consumer instance in this group. The instance_id is automatically generated if the name parameter is not specified.
  • base_uri (string) – Base URI used to construct URIs for subsequent requests against this consumer instance. This will be of the form http://hostname:port/consumers/consumer_group/instances/instance_id.