apalis-pgmq
Background task processing in rust using apalis and pgmq
Features
- Reliable message queue using
pgmqas the backend. - Multiple storage types: standard polling and
triggerbased storages. - Custom codecs for serializing/deserializing job arguments as bytes.
- Integration with
apalisworkers and middleware. - Observability: Monitor and manage tasks using apalis-board.
Examples
Setting up
The fastest way to get started is by running the Docker image, where PGMQ comes pre-installed in Postgres.
Basic Worker Example
use *;
use *;
use ;
async
Observability
Track your jobs using apalis-board.

Roadmap
- Eager Fetcher
- Lazy Fetcher (using NOTIFY)
- Shared Fetcher (Multiple queues on the same connection)
- Batch Sink
- BackendExt
- Worker heartbeats
- Workflow support
- Extensive Docs
- Maximize compatibility with pgmq
Comparison with pgmq
Our version of pgmq differs in several ways to offer better support for apalis:
- Messages are stored as
BYTEAinstead ofJSONBto offer better codec support. - Uses
headerswhich is not yet supported in the rs version - Uses the
apalis_pgmqschema instead ofpgmq.
Credits
- pgmq :A lightweight message queue.
License
Licensed under Postgres License.