Fast and reliable background jobs
open coreMPL-2.0self-hostablefree
River is a transactional job queue backed by Postgres or SQLite, with implementations in Go, Java, JavaScript/TypeScript, Ruby and Rust that are cross-compatible: a job enqueued in one language can be worked in another, and Python can insert jobs. It encourages keeping jobs in the application's own database, so a job is enqueued only if its transaction commits and isn't visible to workers until then. It includes retries, scheduled, periodic and unique jobs, multiple queues, snoozing, batch insertion with COPY, transactional job completion, test helpers and River UI, an open source self-hosted web interface. River Pro adds workflows, batching, sequences, global concurrency limits, a dead letter queue, durable periodic jobs and encrypted jobs.
Problems it solves
- background jobs in Go backed by Postgres
- jobs that are enqueued in the same database transaction as the record they process
- a job must never run before the transaction that created it has committed
- enqueue a job from our Ruby or TypeScript service and process it in a Go worker
- retry failed jobs with backoff and inspect them in a web UI
- cron-style periodic jobs in a Go service
- don't enqueue the same job twice within an hour
- insert tens of thousands of jobs at once without one INSERT per job
- test that my Go handler enqueued the right job
- a job queue for a Go app that uses SQLite
- mark a job complete in the same transaction as the database work it did
- pick a long-running job back up from its last step after a crash
- workflows where one job waits on others, and concurrency limits across all workers
- a background job library for Rust or Java that shares a queue with other languages
Features
- transactional enqueueing
- transactional job completion
- automatic retries
- scheduled jobs
- periodic and cron jobs
- unique jobs by args, period, queue and state
- multiple isolated queues and priorities
- snoozing and cancelling jobs
- batch insertion with COPY FROM
- subscriptions for telemetry
View 6 more
- test helpers
- recorded output and resumable jobs
- River UI web interface (binaries and container image)
- river CLI for migrations
- clients in Go, Java, TypeScript, Ruby and Rust; inserts from Python
- Pro: workflows, batching, sequences, concurrency limits, dead letter queue, durable periodic jobs, encrypted and ephemeral jobs
Capabilities
| Has an API | plan not known |
|---|---|
| Has a command line tool | plan not known |
| Takes plugins | plan not known |
| Has official SDKs | plan not known |
Alternatives
The same job
These do what River does.
- Oban Robust job processing in Elixir, backed by modern PostgreSQL, MySQL, and SQLite3
- GoodJob Multithreaded, Postgres-based, Active Job backend for Ruby on Rails
- Sidekiq Simple, efficient background processing for Ruby
- BullMQ Message queue and batch processing for Node.js, Python, .NET, Elixir, Rust and PHP
- Temporal Durable execution platform for reliable workflows
- gocron A Golang job scheduling package which lets you run Go functions at pre-determined intervals
