notifications

abstract fun notifications(): Flow<PgNotification>

Returns a cold Flow of PgNotification objects received on subscribed channels.

The flow polls the underlying connection at a short interval (500 ms). Cancel the collecting coroutine or call close to stop receiving notifications.

Note: listen must be called before collecting this flow to receive any notifications.

Return

Flow emitting notifications as they arrive.