Skip to content

Latest commit

 

History

History
42 lines (28 loc) · 1.29 KB

README.md

File metadata and controls

42 lines (28 loc) · 1.29 KB

zio subscription

simple subscription service, which managing subscription data (email and address) for users

demo implementation of outbox pattern with change data capture (CDC)

outbox pattern with CDC

the idea of this approach is to have an "outbox" table in the service’s database which is used like event journal for domain events

while applying a change to the subscription data, not only insert/update/delete query on subscription table is done, but together with that, as part of the same transaction, also a record representing the event is inserted into that outbox table

then CDC is used to capture changes from outbox table, in this case events are produced to kafka

sources:

required

  • postgres
  • kafka

postgres wal setup (CDC)

setup

ALTER SYSTEM SET wal_level = logical;

and then restart and check

SHOW wal_level;

config

app mode:

  • all - default, svc and cdc features
  • svc - service features - api, domain impl.
  • cdc - change data capture processing, just one instance/replica of service should run that