PgmqClient
PgMqClient is a client for interfacing with the pgmq system, providing various messaging queue operations. This client makes use of PostgreSQL as a message queue backend.
Parameters
The PgMqDbAdapter instance used for executing database queries.
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.
Functions
Creates a queue in the system with the specified configuration.
Drops the specified queue from the system.
Installs an extension by executing SQL statements from the provided file. The file content is split into individual SQL statements, which are executed in a single transaction.
Installs extensions by reading SQL files from the specified directory and processing each file.
Installs the pgmq extension in the PostgreSQL database if it is not already installed.
Executes database migrations from a list of migration files.
Installs the necessary files from a specified directory path.
Installs database migrations from a list of SQL files.
Retrieves the list of all available queues in the system.
Removes all messages from the specified queue.
Sends a message to the specified queue with optional headers and delay.
Sends multiple messages to the specified queue with optional headers and delay.
Removes a topic binding between a pattern and a queue.