Skip to main content
PostgresEventBridge stores event payloads in a Postgres table and uses LISTEN/NOTIFY for low-latency fanout.

Go support

PostgresEventBridge is not implemented in abxbus-go yet. Use JSONLEventBridge for the currently supported Go bridge.

Optional dependencies

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 to abxbus_events)
  • name: optional bridge label

Setup with a bus

Behavior

  • emit(...) upserts event payload data into the bridge table, then sends NOTIFY with 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.
  • Columns are created on demand only for event_* fields.
  • The full event JSON is stored in event_payload (not just non-event_* fields).
  • event_* columns are also stored as flat mirrored fields for indexing/querying.
  • Rehydration merges event_payload with event_* column values back into a flat event object.
  • Runtime requirements: Python needs asyncpg, TypeScript needs pg and Node.js.