{"id":15187535,"url":"https://github.com/ofceab-studio/dart_pgmq","last_synced_at":"2025-10-08T05:33:00.661Z","repository":{"id":244297215,"uuid":"813854827","full_name":"Ofceab-Studio/dart_pgmq","owner":"Ofceab-Studio","description":"A dart client for Postgres Message Queue (PGMQ).","archived":false,"fork":false,"pushed_at":"2025-01-18T00:32:16.000Z","size":23733,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-02-01T03:14:40.424Z","etag":null,"topics":["dart","message-queue","pgmq","postgresql"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/dart_pgmq","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ofceab-Studio.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-11T21:55:43.000Z","updated_at":"2025-01-28T16:30:03.000Z","dependencies_parsed_at":"2024-06-13T22:55:22.145Z","dependency_job_id":"43da8b95-ada7-4033-8dd0-2896040dc2ba","html_url":"https://github.com/Ofceab-Studio/dart_pgmq","commit_stats":{"total_commits":32,"total_committers":4,"mean_commits":8.0,"dds":0.375,"last_synced_commit":"50899fad953c0205ba4c7c7ab8427d557b545081"},"previous_names":["ofceab-studio/dart_pgmq"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ofceab-Studio%2Fdart_pgmq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ofceab-Studio%2Fdart_pgmq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ofceab-Studio%2Fdart_pgmq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ofceab-Studio%2Fdart_pgmq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ofceab-Studio","download_url":"https://codeload.github.com/Ofceab-Studio/dart_pgmq/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238455056,"owners_count":19475369,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dart","message-queue","pgmq","postgresql"],"created_at":"2024-09-27T18:23:51.123Z","updated_at":"2025-10-08T05:32:55.631Z","avatar_url":"https://github.com/Ofceab-Studio.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Dart PGMQ \nA dart client for Postgres Message Queue ([PGMQ](https://github.com/tembo-io/pgmq)).\n\n### Setup\n\n```bash\n# Start a Postgres instance\ndocker run -d --name postgres -e POSTGRES_PASSWORD=postgres -p 5432:5432 quay.io/tembo/pg16-pgmq:latest\n```\n\n```bash\n# Connect to Postgres\npsql postgres://postgres:postgres@0.0.0.0:5432/postgres\n```\n\n```sql\n-- create the pgmq schema\nCREATE SCHEMA pgmq;\n```\n\n```sql\n-- create the extension in the \"pgmq\" schema\nCREATE EXTENSION pgmq;\n```\n\n### Usage\n\n- With Postgresql\n\n```dart\n// Create a database connection\nfinal databaseParam = DatabaseConnection(\n      host: 'localhost',\n      database: 'postgres',\n      password: 'postgres',\n      username: 'postgres',\n      ssl: false,\n      port: 5432);\n```\n\n```dart\n// Create a pgmq connection with DatabaseConnection param\nfinal pgmq = await Pgmq.createConnection(param: databaseParam);\n```\n\n```dart\n// Create a queue [queueName]\nfinal queue = await pgmq.createQueue(queueName: queueName);\n```\n\n- With Prisma\n\n```dart\n// Create a pgmq connection with PrismaClient\nfinal pgmq = Pgmq.createConnectionUsingPrisma(prismaClient: PrismaClient());\n```\n\n```dart\n// Create a queue [queueName]\nfinal queue = await pgmq.createQueue(queueName: queueName);\n```\n\n### Then\n\n```dart\n// Send a message\nqueue.send({\"foo\": \"bar\"});\n```\n\n```dart\n// Read a message with visibilityTimeOut\nqueue.read(visibilityTimeOut: vt);\n```\n\n```dart\n// Archive a message [messageID]\nqueue.archive(messageID);\n```\n\n```dart\n// Delete a message [messageID]\nqueue.delete(messageID);\n```\n\n```dart\n// Pull messages from queue with a specified polling duration\nqueue.pull(duration: duration);\n```\n\n```dart\n// Pausable pull\nfinal (pausableTimer, stream) = queue.pausablePull(duration: duration);\n\n// Start the pausable pull\npausableTimer.start();\n\n// Pause the pulling\npausableTimer.pause();\n```\n\n```dart\n// Read a message from queue and delete it upon read\nqueue.pop();\n```\n\n```dart\n// Purge all messages from queue\nqueue.purgeQueue();\n```\n\n```dart\n// Drops the queue\nqueue.dropQueue();\n```\n\n\n## Supported Functionalities\n\n- [ ] [Sending Messages](https://tembo-io.github.io/pgmq/api/sql/functions/#sending-messages)\n  - [x] [send](https://tembo-io.github.io/pgmq/api/sql/functions/#send)\n  - [ ] [send_batch](https://tembo-io.github.io/pgmq/api/sql/functions/#send_batch)\n- [ ] [Reading Messages](https://tembo-io.github.io/pgmq/api/sql/functions/#reading-messages)\n  - [x] [read](https://tembo-io.github.io/pgmq/api/sql/functions/#read)\n  - [ ] [read_with_poll](https://tembo-io.github.io/pgmq/api/sql/functions/#read_with_poll)\n  - [x] [pop](https://tembo-io.github.io/pgmq/api/sql/functions/#pop)\n- [ ] [Deleting/Archiving Messages](https://tembo-io.github.io/pgmq/api/sql/functions/#deletingarchiving-messages)\n  - [x] [delete (single)](https://tembo-io.github.io/pgmq/api/sql/functions/#delete-single)\n  - [ ] [delete (batch)](https://tembo-io.github.io/pgmq/api/sql/functions/#delete-batch)\n  - [x] [purge_queue](https://tembo-io.github.io/pgmq/api/sql/functions/#purge_queue)\n  - [x] [archive (single)](https://tembo-io.github.io/pgmq/api/sql/functions/#archive-single)\n  - [ ] [archive (batch)](https://tembo-io.github.io/pgmq/api/sql/functions/#archive-batch)\n- [ ] [Queue Management](https://tembo-io.github.io/pgmq/api/sql/functions/#queue-management)\n  - [x] [create](https://tembo-io.github.io/pgmq/api/sql/functions/#create)\n  - [ ] [create_partitioned](https://tembo-io.github.io/pgmq/api/sql/functions/#create_partitioned)\n  - [ ] [create_unlogged](https://tembo-io.github.io/pgmq/api/sql/functions/#create_unlogged)\n  - [ ] [detach_archive](https://tembo-io.github.io/pgmq/api/sql/functions/#detach_archive)\n  - [x] [drop_queue](https://tembo-io.github.io/pgmq/api/sql/functions/#drop_queue)\n- [ ] [Utilities](https://tembo-io.github.io/pgmq/api/sql/functions/#utilities)\n  - [x] [set_vt](https://tembo-io.github.io/pgmq/api/sql/functions/#set_vt)\n  - [ ] [list_queues](https://tembo-io.github.io/pgmq/api/sql/functions/#list_queues)\n  - [ ] [metrics](https://tembo-io.github.io/pgmq/api/sql/functions/#metrics)\n  - [ ] [metrics_all](https://tembo-io.github.io/pgmq/api/sql/functions/#metrics_all)\n\n## Customs Features \n- [x] Pausable Queue\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fofceab-studio%2Fdart_pgmq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fofceab-studio%2Fdart_pgmq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fofceab-studio%2Fdart_pgmq/lists"}