View a Google Cloud Managed Service for Apache Kafka consumer group
Stay organized with collections
Save and categorize content based on your preferences.
To view the detailed information for a single consumer group, you can use the
Google Cloud console, the Google Cloud CLI, the client library,
the Managed Kafka API, or the open source Apache Kafka APIs.
Required roles and permissions to view a consumer group
This predefined role contains
the permissions required to view your consumer groups. To see the exact permissions that are
required, expand the Required permissions section:
Required permissions
The following permissions are required to view your consumer groups:
List consumer groups:
managedkafka.consumerGroups.list
Get consumer group details:
managedkafka.consumerGroups.get
At the bottom of the Google Cloud console, a
Cloud Shell
session starts and displays a command-line prompt. Cloud Shell is a shell environment
with the Google Cloud CLI
already installed and with values already set for
your current project. It can take a few seconds for the session to initialize.
This command provides detailed information about a specific
Managed Service for Apache Kafka consumer group. It includes information about the consumer
group, including its name, group ID, creation time, and update time.
Replace the following:
CONSUMER_GROUP_ID: The ID or name of the consumer group.
importcom.google.api.gax.rpc.ApiException;importcom.google.cloud.managedkafka.v1.ConsumerGroup;importcom.google.cloud.managedkafka.v1.ConsumerGroupName;importcom.google.cloud.managedkafka.v1.ManagedKafkaClient;importjava.io.IOException;publicclassGetConsumerGroup{publicstaticvoidmain(String[]args)throwsException{// TODO(developer): Replace these variables before running the example.StringprojectId="my-project-id";Stringregion="my-region";// e.g. us-east1StringclusterId="my-cluster";StringconsumerGroupId="my-consumer-group";getConsumerGroup(projectId,region,clusterId,consumerGroupId);}publicstaticvoidgetConsumerGroup(StringprojectId,Stringregion,StringclusterId,StringconsumerGroupId)throwsException{try(ManagedKafkaClientmanagedKafkaClient=ManagedKafkaClient.create()){// This operation is being handled synchronously.ConsumerGroupconsumerGroup=managedKafkaClient.getConsumerGroup(ConsumerGroupName.of(projectId,region,clusterId,consumerGroupId));System.out.println(consumerGroup.getAllFields());}catch(IOException|ApiExceptione){System.err.printf("managedKafkaClient.getConsumerGroup got err: %s",e.getMessage());}}}
fromgoogle.api_core.exceptionsimportNotFoundfromgoogle.cloudimportmanagedkafka_v1# TODO(developer)# project_id = "my-project-id"# region = "us-central1"# cluster_id = "my-cluster"# consumer_group_id = "my-consumer-group"client=managedkafka_v1.ManagedKafkaClient()consumer_group_path=client.consumer_group_path(project_id,region,cluster_id,consumer_group_id)request=managedkafka_v1.GetConsumerGroupRequest(name=consumer_group_path,)try:consumer_group=client.get_consumer_group(request=request)print("Got consumer group:",consumer_group)exceptNotFoundase:print(f"Failed to get consumer group {consumer_group_id} with error: {e.message}")
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-07-27 UTC."],[],[]]