PgPubSub.on() method

Sets 'message' event handler

Signature:

on(event: 'message', listener: typeof message): this;

Parameters

Parameter

Type

Description

event

'message'

'message' — a notification arrived on any listened channel

listener

typeof message

handler invoked when a notification arrived on any listened channel.

Returns:

this

Read this page as plain markdown — no HTML, no navigation. For pasting into an LLM, or for an agent to fetch.