Skip to content

walcastPostgres change data capture for Node

A hand-written pgoutput decoder speaking the streaming replication protocol directly — an async iterator with explicit acks, and a plugin engine when you want a daemon.

The whole zero-plugin experience

ts
import { Walcast } from 'walcast'

const tr = new Walcast({ connection: process.env.DATABASE_URL! })
await tr.setup() // create publication + slot, idempotent

for await (const event of tr.changes()) {
  console.log(event.op, event.table, event.after)
  tr.ack(event) // the slot only advances past what you ack
}

Released under the MIT License.