Skip to content

Guides

Step-by-step tutorials and practical guides for common pgqrs use cases.

Available Guides

  • Basic Queue


    The smallest producer-consumer setup using queue primitives.

    Basic Queue

  • Basic Workflow


    Set up a complete producer-consumer workflow using the new Trigger/Worker architecture.

    Basic Workflow

  • Batch Processing


    Efficiently process high volumes of messages.

    Batch Processing

  • Delayed Messages


    Schedule messages for future processing.

    Delayed Messages

  • Worker Management


    Scale and manage multiple workers in production.

    Worker Management

  • Durable Workflows


    Build crash-resistant, resumable multi-step workflows with automatic recovery.

    Durable Workflows

  • Retry Strategies


    Handle transient failures with automatic, non-blocking retries and backoff.

    Retry Strategies

  • Pausing Workflows


    Suspend execution to wait for external events or human approval.

    Pausing Workflows

Quick Reference

Guide Use Case
Basic Queue Minimal producer-consumer queue usage
Basic Workflow Getting started, understanding the basics
Durable Workflows Multi-step processes, crash recovery
Retry Strategies Error handling, backoff
Pausing Workflows Human-in-the-loop, external webhooks
Batch Processing High throughput, many messages
Delayed Messages Scheduled tasks, reminders, deferred work
Worker Management Production deployment, scaling

Prerequisites

Before following these guides, ensure you have:

  1. pgqrs installed (Installation Guide)
  2. A running PostgreSQL database
  3. The pgqrs schema installed (pgqrs install)

Code Examples

All guides include complete, runnable code examples in both Rust and Python. Choose the tab for your preferred language.