Exception: Pgbus::Streams::PayloadTooLarge
- Defined in:
- lib/pgbus/streams.rb
Overview
Raised when an ephemeral broadcast's JSON payload exceeds PostgreSQL's NOTIFY payload budget (< 8000 bytes). Ephemeral frames ride the NOTIFY itself, so the cap is a hard PostgreSQL limit — durable mode (payload stored in PGMQ, NOTIFY as a bare wake) has no such cap.
Stream#broadcast never raises this: an oversized ephemeral frame auto-degrades to a durable publish (issue #391). The error exists for direct Client#notify_stream callers, where the previous failure mode was a misleading PGMQ::Errors::ConnectionError ("payload string too long") that pointed diagnosis at the connection instead of the payload.