PgMqClient

constructor(pg: PgMqDbAdapter, options: PgMqClient.Options = Options())(source)

Parameters

pg

The PgMqDbAdapter instance used for executing database queries.

options

Configuration options for the client, including installation verification and auto-install behavior.

Features:

  • Installation verification of the pgmq extension in the database.

  • Creating and managing queues with optional notification on message insertion.

  • Listing all existing queues.

  • Sending messages to a queue, with support for headers and optional delay.

  • Batch sending of messages to a queue.

  • Popping messages from a queue.

  • Reading messages from a queue with optional visibility timeout.

  • Archiving and deleting messages by single or bulk identifiers.

  • Purging all messages from a queue.