pgmq-js

January 15, 2025 · View on GitHub

Postgres Message Queue (PGMQ) JavaScript Client Library, supports Transaction, supports Route routing to implement the Exchange functionality of the MQ queue.

GitHub tag License ci codecov

以下所有命令行操作都在 git-bash 窗口中执行

Install global deps for development

npm i -g c8 lerna madge rollup tsx zx

Tested with

Packages

PackageVersion
pgmq-jsmain-svg
@mwcp/pgmqcli-svg

Installation

npm i @waiting/pgmq-js
// or for midway.js
npm i @mwcp/pgmq

Prepare

Start a Postgres instance with the PGMQ extension installed:

docker run -d --name postgres -e POSTGRES_PASSWORD=postgres -p 5432:5432 quay.io/tembo/pg17-pgmq:latest

Create the pgmq extension and necessary tables

export cwd=`pwd`
.scripts/ci/ci-init-db.sh

Supported API

License

MIT

Languages