Back to Catalog
Microservices
Messaging & Events
Polling Publisher
Reliably publish DB-committed events to a broker by polling an outbox table.
Intent & Description
Real-world Use Case
Order Service writes OrderPlaced to outbox table. Polling Publisher runs every 500ms, finds unpublished rows, pushes to Kafka, marks them published. No events lost even if the service crashed mid-operation.
Source
📌 TL;DR
Polling Publisher = a worker that drains your outbox to the broker. Simple, reliable, slightly laggy. Good enough for most systems.
Advantages
- Simple to implement — just a scheduled DB query + publish loop
- No special DB privileges needed (vs transaction log tailing)
- Works with any relational DB
- Guarantees at-least-once delivery
Disadvantages
- Polling adds latency (events aren’t published instantly)
- High-volume outboxes need efficient polling queries + indexing
- DB load from constant polling
- Not as efficient as log tailing for very high throughput