Kafka Error UNKNOWN_MEMBER_ID
Error code 25 · Non-retriable Consumer
The coordinator is not aware of this member.
Common Causes
- Consumer session expired (heartbeat timeout) while processing; broker evicted it from the group, but the consumer still holds the old member ID and tries to commit or heartbeat
- Consumer restarted and received a new member ID, but stale application logic is still using a cached member ID from before the restart
- Consumer took longer than 'session.timeout.ms' between heartbeats due to a GC pause or processing bottleneck, causing broker-side eviction
Solutions
- Increase 'session.timeout.ms' (default 45000ms) and ensure 'heartbeat.interval.ms' is 1/3 of session.timeout.ms; reduce GC pauses on the consumer JVM
- Run heartbeating on a background thread — most modern Kafka clients do this automatically; verify your client version has the background heartbeat thread (librdkafka >= 0.9.3, kafka-python >= 1.3)
- Reduce 'max.poll.records' and processing batch size so the consumer returns to poll() well within 'max.poll.interval.ms'; log a warning if poll interval exceeds 80% of the limit
Diagnostic Commands
# Describe consumer group offsets and lag
kafka-consumer-groups.sh --bootstrap-server localhost:9092 --group <group> --describe
# Look for heartbeat/session events in logs
grep -E 'UnknownMemberId|Heartbeat|session expired|Member.*left' /var/log/kafka/server.log | tail -20Related APIs
This error can be returned by: Heartbeat · JoinGroup · LeaveGroup · SyncGroup
Related KIPs
Debugging Kafka errors? Conduktor Console gives you real-time visibility into your cluster. Explore all errors in the Error Decoder.