You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- txob: Tens of ms with wakeup signals (or `pollingIntervalMs`-bounded without), moderate throughput (10-100/s per processor)
1540
+
- Message queues: Lower latency (~10ms), higher per-broker throughput (10k+/s) with dedicated buffering and fan-out primitives
1541
+
- txob: Tens of ms with wakeup signals (or `pollingIntervalMs`-bounded without). Per-processor throughput is 10-100/s typical, but scales near-linearly with processor count until the database write ceiling — production deployments can reach 1k-10k+/s on a single Postgres/MongoDB. Ultimate ceiling is handler efficiency and DB write capacity, same as any consumer.
1542
1542
1543
1543
**Can I use txob WITH message queues?**
1544
1544
@@ -1809,9 +1809,11 @@ const processor = new EventProcessor<EventType>({
1809
1809
1810
1810
**Throughput:**
1811
1811
1812
-
- Depends on handler speed and concurrency settings
1813
-
- Single processor: 10-100 events/second typical
1814
-
- Horizontally scalable: add more processors for higher throughput
1812
+
- Single processor: 10-100 events/second typical, primarily bounded by handler speed and `maxEventConcurrency`
1813
+
- Aggregate: scales near-linearly with processor count via `FOR UPDATE SKIP LOCKED` (Postgres) / per-document locking (MongoDB), no coordination required
1814
+
- Production deployments can reach **1k-10k+ events/second** on a single well-tuned Postgres/MongoDB
1815
+
- Ultimate ceilings are the same as any message-queue consumer: handler efficiency, downstream-system capacity, and database write throughput
1816
+
- Where message queues genuinely win: fan-out / pub-sub to many independent consumers, cross-region replication, and dedicated burst buffering — not raw single-stream throughput
1815
1817
1816
1818
**Optimization:**
1817
1819
@@ -1886,7 +1888,8 @@ Add a `priority` column to your events table.
1886
1888
1887
1889
- You need **exactly-once semantics** (use Kafka with transactions)
1888
1890
- You need **hard real-time processing** (sub-10ms tail latency) - use message queue
1889
-
- You need **high throughput** (> 10k events/second) - use message queue
1891
+
- You need **fan-out / pub-sub** to many independent consumers - use message broker (txob handlers all run in the same processor process)
1892
+
- You need **sustained throughput beyond your database's write capacity** - use a dedicated message system
1890
1893
- You already have **message queue infrastructure** you're happy with
1891
1894
- You can't make handlers **idempotent**
1892
1895
- You need **complex routing** or pub/sub patterns - use message broker
@@ -1898,7 +1901,7 @@ Add a `priority` column to your events table.
1898
1901
| Infrastructure | Database only | Separate service | Separate cluster | Managed service |
0 commit comments