cpursley / walex

Postgres change events (CDC) in Elixir
MIT License
276 stars 14 forks source link

add transaction's final_lsn in each event #56

Closed DaemonSnake closed 3 months ago

DaemonSnake commented 3 months ago

In the cases where avoiding re-processing of events is mandatory the consumer will need to have access to the LSN of the current transaction

For instance using a redis lock with an expire to avoid multiple workers to process the same event or storing the latest LSN when a transaction is finished processing to know where the consumer shoud resume if it gets restarted (XXX/XXX start location in START_REPLICATION_SLOT)