redis_task_queue 0.2.0 copy "redis_task_queue: ^0.2.0" to clipboard
redis_task_queue: ^0.2.0 copied to clipboard

A small Redis-backed task queue for server-side Dart. Enqueue jobs and process them in a worker with retries, a dead-letter list, and weighted queues.

0.2.0 #

  • Exponential backoff for retries. A failed task is no longer re-enqueued immediately: it goes into a per-queue delayed sorted set (<prefix>:<queue>:delayed) scored with the time it becomes due, and waits min(cap, base * 2^(retry-1)) plus jitter before being retried.
  • Configurable backoff on Worker.connect: backoffBase (default 1s), backoffCap (default 60s), and backoffJitter (default 0.1).
  • The worker's poll loop now runs a due-mover each pass that promotes delayed tasks whose score has passed back onto their pending list. The move is a single atomic Redis Lua script (ZRANGEBYSCORE + ZREM + LPUSH), so a task can't be lost or duplicated, even with multiple workers.
  • Dead-letter behaviour is unchanged; weighted-queue behaviour is unchanged.

0.1.0 #

  • Initial release.
  • Enqueue tasks from a producer, process them in a worker.
  • Retries with a dead-letter list after maxRetries.
  • Weighted queues to avoid starvation.
1
likes
160
points
0
downloads
screenshot

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A small Redis-backed task queue for server-side Dart. Enqueue jobs and process them in a worker with retries, a dead-letter list, and weighted queues.

Repository (GitHub)
View/report issues

Topics

#redis #queue #jobs #worker #backend

License

MIT (license)

Dependencies

redis

More

Packages that depend on redis_task_queue