{"repo":"rieske/postgres-cdc","free":true,"listed":false,"github":"https://github.com/rieske/postgres-cdc","clone":"git clone https://github.com/rieske/postgres-cdc.git","description":"A small library to capture data changes in PostgreSQL database (CDC). Useful for implementing transactional outbox pattern.","language":"Java","stars":22,"topics":["cdc","change-data-capture","postgresql","transactional-outbox"],"license":"Apache-2.0","category":"databases-storage","readme_excerpt":"postgres-cdc Maven Central coordinates: io.github.rieske.cdc:postgres-cdc Java library that utilizes PostgreSQL logical replication feature to implement Change Data Capture. Once logical replication is configured on the PostgreSQL server, this library can subscribe to changes in the specified tables. The change events are streamed in real time and can be relayed to message brokers as they occur, allowing to implement the Transactional Outbox pattern. Prerequisites PostgreSQL PostgreSQL version 13.12 or later. Note 13.12 is the earliest one that this library is tested against at the time of writing. In theory, it may work with PostgreSQL 9.5 and above. Logical replication enabled Logical replication must be configured on the PostgreSQL server. If you are using AWS Aurora, see here for instructions to enable logical replication. wal2json plugin installed This library relies on the wal2json PostgreSQL output plugin to convert the WAL data to JSON. The wal2json plugin should be available in AWS Aurora databases by default. To install the plugin on a self-hosted instance, refer to the plugin's documentation. Usage The public API consists of just two interfaces: - DatabaseChange - ChangeDataCapture As long as the replication slot exists, unconsumed/unacknowledged changes will pile up. When a consumer is stopped, no change will be lost, and the next consumer will start consuming from the last unacknowledged change. Note: leaving the replication slot without a consumer for an extende","default_branch":null,"files":null,"tree":[],"storefront":"/r/rieske","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/rieske/postgres-cdc/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}