PostgresEventBridge stores event payloads in a Postgres table and uses LISTEN/NOTIFY for low-latency fanout.
Optional dependencies
- Python
- TypeScript
Install the Postgres extra (recommended):Equivalent direct dependency install:
Constructor params
table_url:postgresql://user:pass@host:5432/dbname[/tablename]?...channel: optional notify/listen channel (defaults tobubus_events)name: optional bridge label
- Python
- TypeScript
Setup with a bus
- Python
- TypeScript
Behavior
emit(...)upserts event payload data into the bridge table, then sendsNOTIFYwith the event id.on(...)registers inbound handlers and auto-starts listener startup.- On notifications, the bridge fetches the full row payload, reconstructs an event, resets it, and emits locally.
- Event field columns are created on demand to track evolving payload schemas.
- Runtime requirements: Python needs
asyncpg, TypeScript needspgand Node.js.