postgres_pgmq 0.1.0
postgres_pgmq: ^0.1.0 copied to clipboard
Idiomatic Dart client for Postgres Message Queue (PGMQ) on package:postgres. Wraps any Session (Connection, Pool, TxSession) with the full PGMQ SQL API.
0.1.0 #
Breaking changes
-
Renamed
setVt/setVtBatchtosetVisibilityTimeout/setVisibilityTimeoutBatch. -
Renamed the
vtnamed parameter tovisibilityTimeouton all read methods and onwatch. -
Renamed
PgmqMessage.vttoPgmqMessage.visibleAt. -
Added
Pgmq.queueandPgmq.queueOf: queue-scopedPgmqQueue<T>handles that bind the queue name and, for typed handles, payload encoding and decoding once. -
Added
Pgmq.watchandPgmqQueue.watch: a cancellable, pause-aware long-pollStream<PgmqMessage<T>>for consuming messages.
0.0.2 #
- Added
acquireQueueLock: transaction-scoped advisory queue lock (pgmq.acquire_queue_lock), matching the official Rust client andpgmq-go. Serializes queue-level DDL such as FIFO index creation. createPartitionedQueueis now idempotent by default (ifNotExists: true): it takes the queue lock and checkspgmq.metainsiderunTxbefore creating, like the official Rust client. PassifNotExists: falsefor the previous direct call.- Added
queueMetadata/queueExists: single-queue metadata lookups frompgmq.meta. - Added
extensionVersion: the installed PGMQ extension version. - Added
listenNotifyInsert: broadcastStream<String>of insert notifications forConnectionsessions (Pool/TxSessionthrow). QueueMetrics.defaultPartitionLengthparses thedefault_partition_lengthcolumn added in PGMQ v1.13.0 (nullon older servers).- Targets PGMQ v1.13.0 (still compatible with v1.12.0).
0.0.1 #
- Initial release.
- Full PGMQ SQL API (
v1.12.0) over anypackage:postgresSession(Connection,Pool,TxSession): extension setup, queue lifecycle (including unlogged and partitioned queues), send / send batch with headers and delays, read / long-poll / pop, grouped (FIFO) reads, delete / archive (single + batch), visibility timeouts, metrics, topic routing and bindings, insert notifications, FIFO indexes. - Strongly typed
PgmqMessage<T>withtoJson/fromJson/mapPayloadsupport;Map<String, dynamic>payloads work out of the box. - Parameterized queries only — no SQL string interpolation of user input.
- Unit tests, Docker-based integration tests, and examples for
Connection,Pool, transactions, FIFO and topics.