ACTIVE / 2026
DLQ-Surgeon
A RabbitMQ CLI for inspecting, repairing, validating, and safely re-injecting dead-lettered messages.
The problem
RabbitMQ dead-letter queues often contain recoverable messages: a renamed field, an outdated payload shape, a missing required value, or an event caught by a temporary dependency failure. Repairing one by hand usually means copying JSON out of the management UI, reconstructing its exchange and routing key, and republishing it without introducing a duplicate or losing the original.
DLQ-Surgeon turns that fragile sequence into one reviewed workflow. Its list and peek commands inspect queues without changing them; fix fetches a message, lets the operator repair it, validates it when a JSON Schema is supplied, and displays the complete reinjection plan before anything is written.
Safety model
The tool recovers the original destination from the most recent x-death entry, while still allowing an explicit exchange or routing-key override. It publishes the replacement with RabbitMQ publisher confirms and acknowledges the source message only after the broker confirms the new copy. If editing, validation, publication, or confirmation fails, the DLQ message remains untouched.
Operators can enforce read-only mode, preserve the full death history by default, and use named connection profiles. The repair path uses basic.get and basic.ack so it removes the exact selected message—even while new messages arrive in the queue.
AI assistance
With --suggest, an LLM receives the failed payload and its JSON Schema and proposes a schema-aware repair. The suggestion is presented as a unified diff: the operator can accept it, edit it, reject it in favor of the original, or abort. A final repair-plan confirmation remains mandatory unless deliberately bypassed for automation.
The optional LangChain4j module supports Anthropic, OpenAI, Gemini, Ollama, and OpenAI-compatible endpoints. The core, CLI, and AI concerns live in separate Maven modules, and releases include both a Java 21 fat JAR and a GraalVM native executable.
- Commands
- list · peek · fix
- Validation
- JSON Schema Draft-04 through 2020-12
- Delivery guarantee
- Source acknowledged only after publisher confirmation