Postgres Message Queue (PGMQ) JavaScript Client Library,
supports Transaction,
supports Route routing to implement the Exchange
functionality of the MQ queue.
以下所有命令行操作都在 git-bash
窗口中执行
npm i -g c8 lerna madge rollup tsx zx
Tested with
- PGMQ v1.5.0
Package | Version |
---|---|
pgmq-js |
|
@mwcp/pgmq |
npm i @waiting/pgmq-js
// or for midway.js
npm i @mwcp/pgmq
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
- Sending Messages
- Reading Messages
- Deleting/Archiving Messages
- Queue Management
- create
- create_partitioned see
Partition
- create_unlogged
- detach_archive
- drop_queue
- Utilities
- Partition