Kafka Error INVALID_GROUP_ID
Error code 24 · Non-retriable Consumer
The group id is invalid.
Common Causes
- Consumer configured with an empty or null group.id
- Consumer 'group.id' property not set at all — required for any consumer that commits offsets
- Application using a consumer without group.id in manual partition assignment mode then accidentally calling commitSync() or commitAsync() which requires a valid group
Solutions
- Always set a non-empty, meaningful 'group.id' for every consumer application; use a descriptive name like '<app-name>-<env>-consumer' for observability
- If using manual partition assignment (assign() instead of subscribe()), do not call commitSync() or commitAsync() to the group coordinator — manage offsets externally or in a dedicated offset topic
- Validate group.id at application startup and fail fast if it is null or empty rather than discovering the error at first poll
Diagnostic Commands
# List all consumer groups
kafka-consumer-groups.sh --bootstrap-server localhost:9092 --list
# Look for group ID errors in config
grep -E 'InvalidGroupId|group.id' <application-config-file>Related APIs
This error can be returned by: AlterShareGroupOffsets · ConsumerGroupDescribe · DeleteGroups · DeleteShareGroupOffsets · DescribeGroups · Heartbeat · JoinGroup · LeaveGroup · OffsetCommit · OffsetDelete · OffsetFetch · StreamsGroupDescribe · SyncGroup · TxnOffsetCommit
Debugging Kafka errors? Conduktor Console gives you real-time visibility into your cluster. Explore all errors in the Error Decoder.