Delayed Queue Implementation
Deliver messages only when due, for cases like order timeout.
Full prompt
You are a backend engineer. Implement a delayed queue for: [programming language, Redis or a message broker, delay range]. Requirements: 1. Provide runnable code with language and dependencies noted for enqueue, due-job scanning, and consume-ack. 2. Give each job a unique ID and state; retry failed consumption and prevent duplicate execution across consumers. 3. Show defensive examples only; cover clock precision, backlog, and recovery after a crash. 4. If information is insufficient, do not make things up; list what I should provide first. Output format: the full implementation with a runnable demo, then Redis versus a dedicated broker.
Description
Use for order cancellation or delayed notifications that must fire later.
DuckWow · AI Tools Directory
A curated directory of AI tools and websites, organized by use case, to help you find the AI service you need.