Search

Suggested keywords:
  • Java
  • Docker
  • Git
  • React
  • NextJs
  • Spring boot
  • Laravel

River - Fast and reliable background jobs in Go

  • Share this:
post-title

River is a fast and reliable background jobs in Go. River jobs never run before your transaction completes, and are never lost. River supports Transactional enqueueing, This model avoids several common failure modes of background jobs in a distributed application.

One of the biggest benefits of River is that jobs can be enqueued transactionally and atomically along with other database changes. Once a job is committed to the database, River will not lose track of it and will ensure that it is executed. When River jobs encounter an error or other failure, they are automatically retried after a delay. 

River supports batch inserts, wherein many jobs are inserted at once using Postgres' COPY FROM protocol for optimal performance. If a worker recognizes that a job will never succeed, it can be cancelled permanently. It also provides an interface to handle errors and panics for custom application telemetry and to provide execution feedback.

Jobs are worked according to assigned priority, important jobs are processed first. Each named queue is processed independently and won't block other queues. It does graceful shutdown, Waits for active jobs to complete before exiting.

Say for example, Application creates a user and sends out a welcome email. Sending an email is a job. By using River, User creation and email job creation will be done in same transaction.

 

https://riverqueue.com
https://github.com/riverqueue/river
License: