ulak
ulak : Transactional Outbox extension for PostgreSQL with reliable asynchronous delivery
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 2680 | ulak | ulak | 0.3.0 |
FEAT | Apache-2.0 | C |
| Attribute | Has Binary | Has Library | Need Load | Has DDL | Relocatable | Trusted |
|---|---|---|---|---|---|---|
| --sLd-- | No | Yes | Yes | Yes | no | no |
| Relationships | |
|---|---|
| Schemas | ulak |
| See Also | pgmq pgmb pg_durable redis pgq pgmqtt pg_task tcn pg_background fsm_core |
Packages
| Linux / PG | PG19 | PG18 | PG17 | PG16 | PG15 |
|---|---|---|---|---|---|
| el8.x86_64 | N/A | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 |
| el8.aarch64 | N/A | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 |
| el9.x86_64 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 |
| el9.aarch64 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 |
| el10.x86_64 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 |
| el10.aarch64 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 |
| d12.x86_64 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 |
| d12.aarch64 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 |
| d13.x86_64 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 |
| d13.aarch64 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 |
| u22.x86_64 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 |
| u22.aarch64 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 |
| u24.x86_64 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 |
| u24.aarch64 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 |
| u26.x86_64 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 |
| u26.aarch64 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 |
Source
github.com/zeybek/ulak
ulak-0.3.0.tar.gz
Install
Make sure PGDG and PIGSTY repo available:
Install this extension with pig:
Config this extension to shared_preload_libraries:
Create this extension with:
Usage
Sources:
ulak implements a transactional outbox: enqueue messages in the same transaction as application data, then deliver them through background workers. Delivery to remote systems is at least once; consumers must tolerate duplicates.
Enablement
PostgreSQL 14–18 is supported. Set shared_preload_libraries and ulak.database, restart PostgreSQL, then create the extension in that database. HTTP is built in; Kafka, MQTT, Redis Streams, AMQP and NATS require their optional compiled adapters and client libraries.
Enqueue and publish
Create endpoints as an administrator; grant application access through ulak_application. ulak_admin manages endpoints and operations; ulak_monitor reads monitoring data. Use ulak.endpoint_status for endpoint status without exposing endpoint credentials. A rolled-back transaction leaves no message.
Delivery limits and retries
ulak.send_with_options adds priority, scheduling, idempotency, expiry and ordering controls. In 0.3.0 all enqueue APIs enforce ulak.max_payload_size; oversized payloads raise 54000. Batch APIs count each row against ulak.max_queue_size and raise 53400 on overflow. Stale processing rows consume retry budget and eventually enter the dead-letter queue. Workers use synchronous_commit = local and lock_timeout = 10s.
Protocol and upgrade changes
0.3.0 retries HTTP 408/425, Redis OOM/READONLY and unroutable mandatory AMQP messages. Redis TLS now checks hostnames. ulak.mqtt_default_qos defaults to 1; multiple workers suffix configured MQTT client IDs with their worker number. NATS message IDs include cluster and database identity; AMQP message IDs use the queue row ID. Review downstream deduplication assumptions. Install the matching library and SQL, restart to load the worker library, and upgrade the extension. External listeners need ulak.wake_notify = on to receive ulak_new_msg; native workers use shared-memory wakeups.
Monitoring and recovery
Tune ulak.workers, ulak.poll_interval, ulak.batch_size, retry and circuit-breaker settings for the workload. Inspect failures before redriving; redrive and replay can deliver an already-observed message again. HTTP SSRF restrictions apply unless explicitly relaxed.