Message Queue Developer
Build asynchronous backbones with queues: competing consumers, dead letters, idempotent processing, exactly-once trade-offs, and diagnosing lag before customers notice.
Path overview
队列把同步世界的时间压力转换为异步世界的容量问题。本路径从消费者模型与死信语义出发,直面精确一次的工程真相,再用 BullMQ 与 Celery 两条主流栈落地,收尾于 Kafka 积压与 RabbitMQ 队列增长的实战诊断。
Queues convert synchronous latency into asynchronous capacity problems. This path covers consumer models, dead-letter semantics, the truth about exactly-once, BullMQ and Celery in practice, and real lag diagnosis.
Compare "Model the job lifecycle" with "Enqueue atomically" in "How to Build a Job Queue with Backoff and Dead Letters" and state which trade-off you would accept in messaging code.
Next step: BullMQ
⏱ 1h
Stand up "BullMQ" for a messaging task, confirm "new Queue new Queue(name: string, opts: QueueOptions): Queue" holds, and document one failure you triggered.
Prerequisites: How to Build a Job Queue with Backoff and Dead Letters
Next step: Celery
⏱ 1h
Call Celery() Celery(name, broker, backend): Celery from "Celery" and capture both a successful response and one validation error.
Prerequisites: BullMQ
Next step: Add a Dead-Letter Queue Policy
⏱ 1h
Run "Keep a queue consumer moving when one message cannot be processed, while preserving the" from "Add a Dead-Letter Queue Policy" and confirm the documented result "The consumer receives a message at most five times before it moves to the DLQ.".
Next step: Route Exhausted Messages to a Dead Letter Queue
⏱ 0.5h
In the "Message Queue Developer" path, implement "Route Exhausted Messages to a Dead Letter Queue" so JSON object: { messages: [{ id, attempts }], maxAttempts } yields {deadLettered:[m1,m3],retry:[m2]}, including the second sample's edge case.
Prerequisites: Add a Dead-Letter Queue Policy
Next step: Capstone: Message Queue Developer
⏱ 0.33h
Build "Build a Backpressure Queue Service" through its phases, keeping "Watermark monitor" independently testable.
Prerequisites: Add a Dead-Letter Queue Policy, Route Exhausted Messages to a Dead Letter Queue
Next step: Run the capstone's tests, publish the repository, and demo it to a reviewer.
⏱ 4h