pgx-outbox

如果无法正常显示,请先停止浏览器的去广告插件。
分享至:
相关话题: #zalando
1. pgx-outbox FOSDEM lightning talk 1 Feb 2025 Nikolay Kuznetsov @nikolayk812 1
2. About me Senior software engineer Zalando Helsinki Pre-owned project C → Java → Kotlin → Go 2
3. Dual write problem 3
4. Transactional outbox pattern 4
5. pgx-outbox library 5
6. implements Message Writer (Postgres) Reader Forwarder Publisher (SNS) 6
7. Outbox message type Message struct { ID int64 // generated by Postgres Broker string `validate:"required"` Topic string `validate:"required"` Metadata map[string]string // optional Payload []byte `validate:"required,json"` } 7
8. Outbox writer type Writer interface { // Tx is empty interface to support both pgx.Tx and *sql.Tx Write(ctx, tx Tx, message Message) (int64, error) // pgx transaction only to invoke SendBatch and Prepare methods WriteBatch(ctx, tx pgx.Tx, messages []Message) ([]int64, error) } 8
9. Writer demo 9
10. WAL Reader support Write ahead log (WAL), aka Change data capture (CDC), aka Postgres logical replication Work in progress (WIP) using jackc/pglogrepl 10
11. Thank you! github.com/nikolayk812/pgx-outbox 11

首页 - Wiki
Copyright © 2011-2025 iteam. Current version is 2.142.1. UTC+08:00, 2025-04-03 04:48
浙ICP备14020137号-1 $访客地图$