feat(outbox): relay committed outbox events to Kafka

This commit is contained in:
shira committed 2026-10-06 03:01:53 +03:00
1 parent 78f1651f6b
commit 6c3b34f73e
42 files changed
+3731 -45

No files matched your search

@@ -0,0 +1,13 @@
-- +goose Up
-- Supports the relay check that an outbox row is the earliest unpublished
-- event of its aggregate. The relay publishes only that row for each
-- aggregate per pass, so the check runs once for every candidate row. Without
-- this index the lookup reads every published event of the aggregate through
-- the unique key. The index covers only unpublished rows and shrinks as
-- events are published.
CREATE INDEX outbox_events_unpublished_aggregate_idx
ON outbox_events (aggregate_type, aggregate_id, aggregate_version, position)
WHERE published_at IS NULL;
-- +goose Down
DROP INDEX outbox_events_unpublished_aggregate_idx;