From cbbd8c6752ace3fcf71585a347a2cea56d3c98fe Mon Sep 17 00:00:00 2001 From: abelanger5 Date: Wed, 30 Sep 2026 11:58:12 -0400 Subject: [PATCH 1/4] Refactor README for clarity and conciseness Removed redundant explanations for batched reads/writes and exclusive consumers. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2424c76..e2c9aad 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,8 @@ While working on [Hatchet](https://github.com/hatchet-dev/hatchet) we needed a reliable and performant way to durably persist messages over a message boundary. In particular, we needed: -- **Batched reads and writes.** `AddMessages` inserts a batch of messages in a single transaction, and `ProcessMessages` locks a batch, hands the whole batch to one `Flush` call, and deletes it in the same transaction (see [Atomic flush and delete](#atomic-flush-and-delete) and [Benchmarks](#benchmarks)). -- **Exclusive consumers with leasing semantics.** Exactly one instance across a fleet owns a topic under a renewing lease, and a standby takes over within seconds if the holder goes away (see [Exclusive consumers](#exclusive-consumers)). +- **Batched reads and writes.** See [Atomic flush and delete](#atomic-flush-and-delete) and [Benchmarks](#benchmarks). +- **Exclusive consumers with leasing semantics.** see [Exclusive consumers](#exclusive-consumers). - **Support for publishing across hundreds of thousands of topics.** Topics are plain strings that don't need to be declared up front, and they're tracked in a table rather than by a poller or worker pool per topic (see [Multiple topics and flushers](#multiple-topics-and-flushers) and [Message expiration](#message-expiration)). Without these particular requirements, a library like [River](https://github.com/riverqueue/river) would otherwise have been a good fit. `pgoutbox` is deliberately an outbox rather than a job queue: there are no retries, scheduling, priorities, or job history, and messages are deleted as soon as they're flushed. From fa1df80e276bc460de186842a221112af1e5f1b9 Mon Sep 17 00:00:00 2001 From: abelanger5 Date: Wed, 30 Sep 2026 12:00:26 -0400 Subject: [PATCH 2/4] Clarify message persistence requirements in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e2c9aad..e344107 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ ## Why? -While working on [Hatchet](https://github.com/hatchet-dev/hatchet) we needed a reliable and performant way to durably persist messages over a message boundary. In particular, we needed: +While working on [Hatchet](https://github.com/hatchet-dev/hatchet) we needed a reliable and performant way to durably persist messages over a message boundary using Postgres. In particular, we needed: - **Batched reads and writes.** See [Atomic flush and delete](#atomic-flush-and-delete) and [Benchmarks](#benchmarks). - **Exclusive consumers with leasing semantics.** see [Exclusive consumers](#exclusive-consumers). From 7690fbdb7488691cff5b1bedec29503d10f33c50 Mon Sep 17 00:00:00 2001 From: abelanger5 Date: Wed, 30 Sep 2026 12:03:24 -0400 Subject: [PATCH 3/4] Modify example usage to include link to examples Updated example usage section to reference full working example. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e344107..c23aaa2 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Without these particular requirements, a library like [River](https://github.com ## Example usage -Here's an example of flushing messages on `topic1` by simply printing them to the console: +For a full working example, see [./examples](./examples). Here's an example of flushing messages on `topic1` by simply printing them to the console: ```go type printFlusher struct{} From 3662bfde23073c3557d3f812cf4c3b3314373c42 Mon Sep 17 00:00:00 2001 From: abelanger5 Date: Wed, 30 Sep 2026 12:47:06 -0400 Subject: [PATCH 4/4] Update README with image and project rationale Added an image to the README and expanded the explanation of the project's purpose. --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index c23aaa2..84a1095 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,8 @@ `pgoutbox` implements a simple [transactional outbox](https://microservices.io/patterns/data/transactional-outbox.html) for [`pgx`](https://github.com/jackc/pgx). New messages can be added to a Postgres table within a transaction using `AddMessages` and can be flushed to a destination via `ProcessMessages`. +pgoutbox + ## Why? While working on [Hatchet](https://github.com/hatchet-dev/hatchet) we needed a reliable and performant way to durably persist messages over a message boundary using Postgres. In particular, we needed: