Kafka Error DUPLICATE_RESOURCE
Error code 92 · Non-retriable Admin
A request illegally referred to the same resource twice.
Common Causes
- CreateTopics or CreateAcls request contained the same resource name twice in a single batch request
- Admin client code iterating over a collection inadvertently added duplicate entries before submitting the batch
- Templating or config-generation tool produced duplicate topic or ACL definitions
Solutions
- Deduplicate resource names before submitting batch Admin API requests — use a Set instead of List for resource collections
- Add server-side idempotency by checking existence first (CreateTopics with validate_only=true) and filtering out already-existing resources
- Fix the upstream config generator or IaC tool (Terraform, Ansible) that is emitting duplicate definitions
Diagnostic Commands
# Check for duplicate ACL entries
kafka-acls.sh --bootstrap-server localhost:9092 --list | sort | uniq -d
# List all topics on the cluster
kafka-topics.sh --bootstrap-server localhost:9092 --list | sort | uniq -d
Debugging Kafka errors? Conduktor Console gives you real-time visibility into your cluster. Explore all errors in the Error Decoder.