PG-Capture
Schema-based Change-Data-Capture for Postgres
Table-level event
{
action: 'INSERT',
table: 'book',
data: {
id: '1',
title: 'The Hobbit',
authorId: '2'
}
}
PG-Capture
{
table: 'book',
schema: {
id: 'id',
title: 'title',
author: {
type: 'many-to-one',
column: 'authorId',
references: 'author.id',
schema: 'name',
}
}
}
Schema-level event
{
upsert: [
{
id: '1',
title: 'The Hobbit',
author: 'J.R.R. Tolkien'
}
],
delete: [],
}
Schema-based
Write your schema and let PG-Capture aggregate table-level events into high-level events to be used in your application.
Eventually consistent
Keep Postgres as your primary database and sync complex schemas to ElasticSearch, Algolia, Redis, or any other data store effortlessly.
Agnostic
PG-Capture is a minimalist utility that lets you use any service to capture Postgres events (Debezium, WAL-listener...) and can publish to any provider (RabbitMQ, Redis, ElasticSearch...).