A Go outbox library that runs inside your own DB transaction
A new Go library called tickr allows for message storage within a Postgres database transaction. This library aims to simplify the transactional outbox pattern by enabling messages to be stored and processed without the need for a separate message broker. It integrates features like Prometheus metrics and OpenTelemetry tracing for enhanced monitoring and observability.
- ▪Tickr stores messages in a Postgres table and processes them within the same database transaction.
- ▪This approach eliminates the risk of desynchronization between database commits and message publishing.
- ▪Tickr allows for at-least-once delivery of messages, even in the event of process crashes.
Opening excerpt (first ~120 words) tap to expand
try { if(localStorage) { let currentUser = localStorage.getItem('current_user'); if (currentUser) { currentUser = JSON.parse(currentUser); if (currentUser.id === 753256) { document.getElementById('article-show-container').classList.add('current-user-is-article-author'); } } } } catch (e) { console.error(e); } ndmt1at21 Posted on May 26 A Go outbox library that runs inside your own DB transaction #go #postgres #microservices #opensource TL;DR — tickr is a Go library. It stores messages in one Postgres table. You add messages inside your own database transaction. A worker pool in the same Go process reads them back using SELECT … FOR UPDATE SKIP LOCKED and runs your handler. It ships with Prometheus metrics, OpenTelemetry tracing, and a Grafana dashboard. No broker. No second datastore.
…
Excerpt limited to ~120 words for fair-use compliance. The full article is at DEV.to (Top).