Kafka Share-Group Failures
Share groups use record acquisition locks and acknowledgement state. Consumer-group offset assumptions do not map directly to them.
Capture Group State
Section titled “Capture Group State”kafka-share-groups.sh --bootstrap-server kafka:9092 \ --describe --group work-queue --statekafka-share-groups.sh --bootstrap-server kafka:9092 \ --describe --group work-queue --members --verbosekafka-share-groups.sh --bootstrap-server kafka:9092 \ --describe --group work-queue --offsetsCapture member IDs, assigned topics, delivery-attempt counts, acknowledgement type/errors, acquisition-lock expiry/renewal, archived records, coordinator broker, client/server versions, and group configuration.
Error Patterns
Section titled “Error Patterns”| Error or symptom | Investigate |
|---|---|
SHARE_SESSION_NOT_FOUND | Session eviction, connection churn, coordinator movement |
INVALID_SHARE_SESSION_EPOCH | Stale concurrent requests or client/session lifecycle |
SHARE_SESSION_LIMIT_REACHED | Abandoned sessions, churn, concurrency, broker capacity |
FENCED_STATE_EPOCH | Stale coordinator state or admin operation |
| Lock expires repeatedly | Processing exceeds lock duration or renewal fails |
| Records redeliver | Release, failed ack, lock expiry, member failure |
| Records archive unexpectedly | Reject action or delivery-attempt limit |
Recover
Section titled “Recover”- Restore stable client connections and coordinator health.
- Let the supported client rebuild a lost or stale session.
- Fix processing time or use supported lock renewal instead of extending every timeout blindly.
- Correct acknowledgement logic and observe results per partition.
- Reset offsets only while the share group is inactive, using
--dry-runbefore--execute.
Kafka 4.4 DLQ Checks
Section titled “Kafka 4.4 DLQ Checks”Broker-managed share-group DLQs require Kafka 4.4 and share.version=2. Verify group errors.deadletterqueue.* settings, DLQ topic configuration, broker authorization, write/error metrics, and whether the record was actually archived.
Verify
Section titled “Verify”Members and sessions remain stable, acquisition locks complete or renew as designed, acknowledgement errors stop, delivery attempts behave within policy, and archived records reach the configured DLQ when eligible.
Prevent Recurrence
Section titled “Prevent Recurrence”Monitor share-session count/limits, lock expiry, acknowledgement error rate, delivery attempts, archive/DLQ rate, coordinator errors, and client churn. Load-test processing duration against lock policy.