A dart client for Postgres Message Queue (PGMQ).
# Start a Postgres instance docker run -d --name postgres -e POSTGRES_PASSWORD=postgres -p 5432:5432 quay.io/tembo/pg16-pgmq:latest
# Connect to Postgres psql postgres://postgres:postgres@0.0.0.0:5432/postgres
-- create the pgmq schema CREATE SCHEMA pgmq;
-- create the extension in the "pgmq" schema CREATE EXTENSION pgmq;
// Create a database connection final databaseParam = DatabaseConnection( host: 'localhost', database: 'postgres', password: 'postgres', username: 'postgres', ssl: false, port: 5432);
// Create a pgmq connection with DatabaseConnection param final pgmq = await Pgmq.createConnection(param: databaseParam);
// Create a queue [queueName] final queue = await pgmq.createQueue(queueName: queueName);
// Create a pgmq connection with PrismaClient final pgmq = Pgmq.createConnectionUsingPrisma(prismaClient: PrismaClient());
// Create a queue [queueName] final queue = await pgmq.createQueue(queueName: queueName);
// Send a message queue.send({"foo": "bar"});
// Read a message with visibilityTimeOut queue.read(visibilityTimeOut: vt);
// Archive a message [messageID] queue.archive(messageID);
// Delete a message [messageID] queue.delete(messageID);
// Pull messages from queue with a specified polling duration queue.pull(duration: duration);
// Pausable pull final (pausableTimer, stream) = queue.pausablePull(duration: duration); // Start the pausable pull pausableTimer.start(); // Pause the pulling pausableTimer.pause();
// Read a message from queue and delete it upon read queue.pop();
// Purge all messages from queue queue.purgeQueue();
// Drops the queue queue.dropQueue();Supported Functionalities
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4