A consumer group is a set of consumers that cooperate to consume data from
various topics. The consumers in a consumer group all have the same group.id
.
Consumer groups don't need to be explicitly created, and by default, a random consumer group.id
is chosen. To use a specific group.id
, you only need to
start a new consumer application with a group-id
set to a
consumer-group ID in the consumer properties file. If the specified group-id
does not exist, Kafka creates a new consumer group.
For example, when using the Kafka console consumer:
kafka-console-consumer.sh --topic TOPIC --bootstrap-server BOOTSTRAP --group GROUP
Replace the following:
TOPIC
: the topic name.BOOTSTRAP
: the bootstrap server.GROUP
: the consumer group ID.
You can also set other configuration options, such as offset management settings, by using the client properties file.
Managed Service for Apache Kafka provides APIs to view, update, and delete consumer groups within Google Cloud.