pattern

Change Data Capture

also called CDC

Publishing a stream of a database's row-level changes by reading its replication log, without modifying the application that owns it.

integrationstreamingreplication

CDC turns a database into an event source. A connector tails the write-ahead log and emits an event per insert, update and delete, which downstream systems consume to keep caches, search indexes, warehouses or other services in step.

Its great virtue in legacy integration is that the source application does not have to change, and often cannot. Its great virtue over polling is that it captures every intermediate state and imposes almost no load on the source.

The caveat is that CDC events are database events, not business events. They carry table names and column values, which couples every consumer to the source schema — exactly the coupling services were meant to avoid. Treat CDC output as an internal feed to be translated into published business events, not as the published contract itself.