@event-horizon-data/cdc
v0.2.0
Published
Event Horizon change data capture: native MySQL, PostgreSQL, MongoDB and SQL Server change feeds, initial copy and a checkpointed stream runner.
Maintainers
Readme
@event-horizon-data/cdc
Native change data capture for MySQL, PostgreSQL, MongoDB and SQL Server, plus the checkpointed runner that drives it.
- Drivers (
/mysql,/postgres,/mongodb,/sqlserver):check(),currentPosition(),stream({from, sink}),backfill({from, cursor, sink}),stop(). Each is loaded from its own entry point, so an application only loads the database libraries of the engines it uses. - Runner (
/stream_runner): keeps one stream alive without ever advancing the position past something that is not durably delivered. The checkpoint store and the delivery function are injected. - Event shape:
{op: c|u|d|r|schema_change, schema, table, pk, before, after, source, event_id, ddl?}with deterministic ids, so a replay is recognisable. Delivery is at-least-once. - Initial copy: pins a position, copies by keyset pagination, then streams from the pin; whole-row events replayed over the copy converge.
Used by the Event Horizon ingestor and by the Collection Agent. MIT licensed.
