[hw-6] add notifier service, kafka

This commit is contained in:
Никита Шубин
2025-07-17 19:20:27 +00:00
parent 424d6905da
commit 6e1ad86128
33 changed files with 1412 additions and 92 deletions

View File

@@ -0,0 +1,17 @@
-- +goose Up
CREATE TABLE if not exists outbox
(
id bigserial PRIMARY KEY,
order_id BIGINT NOT NULL,
topic text NOT NULL,
key text,
payload jsonb NOT NULL,
status text NOT NULL DEFAULT 'new', -- new | sent | error
created_at timestamptz NOT NULL DEFAULT now(),
sent_at timestamptz
);
CREATE INDEX ON outbox (status, created_at);
-- +goose Down
DROP TABLE outbox;