Task Queues And Competing Consumers

Distributing work to a pool of interchangeable workers through a queue: the lease and visibility-timeout model, and why an expired lease duplicates work instead of failing it; sizing the timeout from processing plus prefetch wait; heartbeats and their failure mode; admission and retention bounds; priority starvation; and age, backlog, arrival and drain rate as autoscaling signals. Use when two workers process one message although nothing retried or failed, when a lease is relied on for mutual exclusion, when a handler outlives its lease, when a queue has no maximum depth, when autoscaling is driven by queue depth, or when a poll loop feeds an unbounded executor. Not ack placement (delivery-semantics), repeat-safe handlers (idempotency), the message that never succeeds (poison-messages-and-dlq), queue arithmetic (littles-law-and-queueing), the concurrency limit (concurrency-limiting-and-bulkheads), shedding (rate-limiting-and-load-shedding), or the Kafka consumer group, a log (kafka-consumers-in-java).

robsonkades Updated

File contents

robsonkades/agent-skills/tree/main/skills/task-queues-and-competing-consumers commit 1f4347c948

Frequently asked questions

npx skillmds@latest add robsonkades/task-queues-and-competing-consumers