ulak
ulak : Transactional Outbox extension for PostgreSQL with reliable asynchronous delivery
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 2680 | ulak
|
ulak
|
0.0.2 |
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 |
preload required; rm README from RPM/DEB
Packages
| Type | Repo | Version | PG Major Compatibility | Package Pattern | Dependencies |
|---|---|---|---|---|---|
| EXT | PIGSTY
|
0.0.2 |
18
17
16
15
14
|
ulak |
- |
| RPM | PIGSTY
|
0.0.2 |
18
17
16
15
14
|
ulak_$v |
- |
| DEB | PIGSTY
|
0.0.2 |
18
17
16
15
14
|
postgresql-$v-ulak |
- |
| Linux / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
el8.x86_64
|
PIGSTY 0.0.2
|
PIGSTY 0.0.2
|
PIGSTY 0.0.2
|
PIGSTY 0.0.2
|
PIGSTY 0.0.2
|
el8.aarch64
|
PIGSTY 0.0.2
|
PIGSTY 0.0.2
|
PIGSTY 0.0.2
|
PIGSTY 0.0.2
|
PIGSTY 0.0.2
|
el9.x86_64
|
PIGSTY 0.0.2
|
PIGSTY 0.0.2
|
PIGSTY 0.0.2
|
PIGSTY 0.0.2
|
PIGSTY 0.0.2
|
el9.aarch64
|
PIGSTY 0.0.2
|
PIGSTY 0.0.2
|
PIGSTY 0.0.2
|
PIGSTY 0.0.2
|
PIGSTY 0.0.2
|
el10.x86_64
|
PIGSTY 0.0.2
|
PIGSTY 0.0.2
|
PIGSTY 0.0.2
|
PIGSTY 0.0.2
|
PIGSTY 0.0.2
|
el10.aarch64
|
PIGSTY 0.0.2
|
PIGSTY 0.0.2
|
PIGSTY 0.0.2
|
PIGSTY 0.0.2
|
PIGSTY 0.0.2
|
d12.x86_64
|
PIGSTY 0.0.2
|
PIGSTY 0.0.2
|
PIGSTY 0.0.2
|
PIGSTY 0.0.2
|
PIGSTY 0.0.2
|
d12.aarch64
|
PIGSTY 0.0.2
|
PIGSTY 0.0.2
|
PIGSTY 0.0.2
|
PIGSTY 0.0.2
|
PIGSTY 0.0.2
|
d13.x86_64
|
PIGSTY 0.0.2
|
PIGSTY 0.0.2
|
PIGSTY 0.0.2
|
PIGSTY 0.0.2
|
PIGSTY 0.0.2
|
d13.aarch64
|
PIGSTY 0.0.2
|
PIGSTY 0.0.2
|
PIGSTY 0.0.2
|
PIGSTY 0.0.2
|
PIGSTY 0.0.2
|
u22.x86_64
|
PIGSTY 0.0.2
|
PIGSTY 0.0.2
|
PIGSTY 0.0.2
|
PIGSTY 0.0.2
|
PIGSTY 0.0.2
|
u22.aarch64
|
PIGSTY 0.0.2
|
PIGSTY 0.0.2
|
PIGSTY 0.0.2
|
PIGSTY 0.0.2
|
PIGSTY 0.0.2
|
u24.x86_64
|
PIGSTY 0.0.2
|
PIGSTY 0.0.2
|
PIGSTY 0.0.2
|
PIGSTY 0.0.2
|
PIGSTY 0.0.2
|
u24.aarch64
|
PIGSTY 0.0.2
|
PIGSTY 0.0.2
|
PIGSTY 0.0.2
|
PIGSTY 0.0.2
|
PIGSTY 0.0.2
|
u26.x86_64
|
PIGSTY 0.0.2
|
PIGSTY 0.0.2
|
PIGSTY 0.0.2
|
PIGSTY 0.0.2
|
PIGSTY 0.0.2
|
u26.aarch64
|
PIGSTY 0.0.2
|
PIGSTY 0.0.2
|
PIGSTY 0.0.2
|
PIGSTY 0.0.2
|
PIGSTY 0.0.2
|
Source
pig build pkg ulak; # build rpm/debInstall
Make sure PGDG and PIGSTY repo available:
pig repo add pgsql -u # add both repo and update cacheInstall this extension with pig:
pig install ulak; # install via package name, for the active PG version
pig install ulak -v 18; # install for PG 18
pig install ulak -v 17; # install for PG 17
pig install ulak -v 16; # install for PG 16
pig install ulak -v 15; # install for PG 15
pig install ulak -v 14; # install for PG 14Config this extension to shared_preload_libraries:
shared_preload_libraries = 'ulak';Create this extension with:
CREATE EXTENSION ulak;Usage
Sources: README, wiki, v0.0.2 release
ulak implements the transactional outbox pattern inside PostgreSQL. Messages are inserted transactionally, then background workers deliver them asynchronously with retries, circuit breaking, and dead-letter handling.
Enable the Extension
-- postgresql.conf
shared_preload_libraries = 'ulak'
CREATE EXTENSION ulak;The README also shows setting ulak.database when running the included Docker example.
Define Endpoints and Send Messages
SELECT ulak.create_endpoint(
'my-webhook',
'http',
'{"url":"https://httpbin.org/post","method":"POST"}'::jsonb
);
BEGIN;
INSERT INTO orders (id, total) VALUES (1, 99.99);
SELECT ulak.send('my-webhook', '{"order_id":1,"total":99.99}'::jsonb);
COMMIT;The same API pattern is documented for kafka, mqtt, redis, amqp, and nats endpoints.
Delivery Controls and Pub/Sub
SELECT ulak.send_with_options(
'my-webhook',
'{"event":"order.created"}'::jsonb,
5,
NOW() + INTERVAL '10 minutes',
'order-123-created',
'550e8400-e29b-41d4-a716-446655440000'::uuid,
NOW() + INTERVAL '1 hour',
'order-123'
);
SELECT ulak.send_batch('my-webhook', ARRAY['{"id":1}'::jsonb, '{"id":2}'::jsonb]);
SELECT ulak.create_event_type('order.created', 'New order placed');
SELECT ulak.subscribe('order.created', 'my-webhook');
SELECT ulak.publish('order.created', '{"order_id":123}'::jsonb);Monitoring and Recovery
SELECT * FROM ulak.health_check();
SELECT * FROM ulak.get_worker_status();
SELECT * FROM ulak.get_endpoint_health();
SELECT * FROM ulak.dlq_summary();
SELECT ulak.redrive_message(42);
SELECT ulak.redrive_endpoint('my-webhook');
SELECT ulak.redrive_all();
SELECT ulak.replay_message(100);Key Settings
The README highlights these ulak. GUCs:
workerspoll_intervalbatch_sizemax_queue_sizecircuit_breaker_thresholdcircuit_breaker_cooldownhttp_timeoutdlq_retention_days
The v0.0.2 release notes only document a Docker publish workflow fix, so the current README and wiki remain the authoritative user-facing usage sources.