Kafka Connect Dead Letter Queue and Error Handling Design Prompt
Design connector-level error tolerance, dead-letter-queue routing, and retry/backoff for Kafka Connect so a single poison record or transient sink failure never silently drops data or stalls the connector.
- Target user
- Data and platform engineers
- Difficulty
- Advanced
- Tools
- Claude, ChatGPT, Cursor
The prompt
You are a senior Kafka Connect engineer designing error handling and DLQ routing for a connector, producing a configuration and an operational playbook to review before deployment. I will provide: - Connector type (source or sink), the converter/SMT chain, and the sink system's failure modes - Failure history: which errors are poison-record (deserialization/conversion) vs. transient (sink timeout, throttling) vs. permanent (auth, schema mismatch) - Delivery requirement: whether the pipeline can tolerate skipping bad records or must guarantee no loss - Current settings: errors.tolerance, errors.deadletterqueue.*, retry/backoff, and any silent-drop incidents Your job: 1. **Separate poison from transient** — classify which failures are per-record (belong in a DLQ) versus systemic (should stop the connector and page), since errors.tolerance=all would wrongly swallow both. 2. **Configure the DLQ correctly** — set errors.deadletterqueue.topic.name, replication factor, and enable errors.deadletterqueue.context.headers.enable so each dead-lettered record carries the failure reason, original topic, partition, and offset. 3. **Set tolerance intentionally** — choose errors.tolerance=all only for the converter/SMT stage with a DLQ attached, and justify where none is safer so systemic failures fail loud. 4. **Tune retries** — set errors.retry.timeout and errors.retry.delay.max.ms for transient sink errors so the connector retries with backoff before dead-lettering, without spinning forever. 5. **Make the DLQ observable and drainable** — define alerting on DLQ produce rate and a reprocessing path (fix + replay from the DLQ) so dead-lettered records are recovered, not forgotten. 6. **Guard ordering and idempotency** — note where DLQ routing breaks per-key ordering and how the sink's idempotency handles replayed records. Output: (a) failure classification table, (b) full errors.* connector config, (c) DLQ topic spec and header settings, (d) alerting + reprocessing playbook, (e) ordering/idempotency caveats. Advisory only; errors.tolerance=all silently skips records that miss the DLQ — validate the DLQ actually captures failures in staging with an injected poison record before production.
Run this prompt with AI
Test it, get an AI-improved version, or compare models — live in the Prompt Workspace. No copy-paste.
Related prompts
-
Kafka Connect Pipeline Debugging & Tuning Prompt
Diagnose a failing or lagging Kafka Connect pipeline — dead or restarting tasks, DLQ growth, offset stalls, and rebalance churn — then prescribe connector, converter, and worker tuning that is safe to roll out.
-
Kafka Client Quota and Throttling Design Prompt
Design produce, fetch, and request-percentage quotas per user/client-id so one noisy tenant cannot saturate broker network or CPU and starve others on a shared cluster.
-
Kafka Cost and Storage Footprint Optimization Prompt
Review a Kafka cluster's storage, replication, and retention footprint to cut disk and inter-broker/cross-AZ network cost without weakening durability guarantees.
-
Kafka Cruise Control Self-Balancing Setup Prompt
Configure LinkedIn Cruise Control goals, capacity model, and anomaly detection to keep partition load, disk, and leadership balanced automatically without manual reassignment JSON.
More Kafka prompts & error guides
Browse every Kafka prompt and troubleshooting guide in one place.
Reading prompts? Get all 500 in one free PDF
500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.
- 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
- Instant PDF download — yours free, forever
- Plus one practical AI-workflow email a week (no spam)
Single opt-in · unsubscribe anytime · no spam.