Introduction
A PostgreSQL-powered job queue for Go applications
Swig
Job queues as refreshing as taking a swig 🍺
Swig is a robust, PostgreSQL-backed job queue system for Go applications, designed for developers who need reliable background job processing with minimal setup.
⚠️ Alpha Status: Swig is currently in alpha and actively being developed towards v1.0.0. The API may undergo changes during this phase. For stability in production environments, we strongly recommend pinning to a specific version:
Features
- PostgreSQL Integration: Built on top of PostgreSQL for reliability and scalability
- Go-First Design: Native Go implementation with idiomatic patterns
- Simple API: Easy to use with minimal boilerplate
- Distributed Processing: Run multiple workers across different machines
- Transaction Support: Integrate with your existing database transactions
- Batch Processing: Efficiently add multiple jobs in a single operation
Why PostgreSQL?
Swig leverages PostgreSQL's powerful features to provide a robust job queue solution:
- Self-Hosted: No external services required - just your existing PostgreSQL database
- Transactional Guarantees: Jobs are processed exactly once with ACID compliance
- Built-in Queue Management: Uses PostgreSQL's SKIP LOCK for efficient job distribution
- Leader Election: Automatic leader election using PostgreSQL advisory locks
- Real-time Notifications: Native LISTEN/NOTIFY support for immediate job processing
- Scalability: Process jobs across multiple machines without external coordination
Quick Start
Why Swig?
Swig was created to provide a reliable, PostgreSQL-based job queue for Go applications. It leverages PostgreSQL's robust transaction support and durability guarantees to ensure your jobs are processed reliably.
Built by Timothy Ogbemudia (glamboyosa), Swig combines the power of PostgreSQL with Go's simplicity to deliver a robust job queue solution.
Documentation
- Installation - How to install and set up Swig
- Configuration - Learn how to configure Swig for your needs
- Examples - Practical examples of using Swig
- API Reference - Detailed API documentation