typelevel / skunk

A data access library for Scala + Postgres.
https://typelevel.org/skunk/
MIT License
1.59k stars 163 forks source link

Feature request: logical replication #1080

Open n3ziniuka5 opened 6 months ago

n3ziniuka5 commented 6 months ago

It would be great if we could use Skunk for native Postgres CDC. it could have a great advantage over embedded debezium, because it still uses polling so isn't great for latency-sensitive applications.

mpilquist commented 6 months ago

@n3ziniuka5 Thanks for the suggestion! I'm not familiar with Postgres CDC. Do you have an idea what would be involved in adding support to Skunk?

n3ziniuka5 commented 6 months ago

Skunk already supports streaming, e.g. NOTIFY/LISTEN channels, and I think users could create publications and replication slots themselves, so you would only need to understand Postgres logical decoding. I say "only", but that's probably a big amount of work.