Kafka Error NON_EMPTY_GROUP
Error code 68 · Non-retriable Consumer
The group is not empty.
Common Causes
- Attempting to delete a consumer group that still has active members (consumers connected and heartbeating)
- Consumer application crashed but its session has not yet timed out (`session.timeout.ms` not elapsed), so the group still appears active
- Automated tooling tries to delete a group immediately after sending a stop signal before consumers have left
Solutions
- Stop all consumers in the group, wait for `session.timeout.ms` (default 45s) to elapse, then retry `kafka-consumer-groups.sh --delete`
- Verify group is truly empty: `kafka-consumer-groups.sh --bootstrap-server localhost:9092 --describe --group <groupId>` — all members should show empty under CONSUMER-ID
- Reduce `session.timeout.ms` on consumers to allow faster group cleanup in CI/CD or test environments
Diagnostic Commands
# Describe consumer group offsets and lag
kafka-consumer-groups.sh --bootstrap-server localhost:9092 --describe --group <groupId>
# Search for the consumer group by name
kafka-consumer-groups.sh --bootstrap-server localhost:9092 --list | grep <groupId>Related APIs
This error can be returned by: DeleteGroups
Debugging Kafka errors? Conduktor Console gives you real-time visibility into your cluster. Explore all errors in the Error Decoder.