pgmq-ruby 0.8.1 → 0.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/README.md +6 -5
- data/lib/pgmq/queue_name.rb +3 -3
- data/lib/pgmq/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 943d0ebf4cffa43c1163f651575cbfb0e9785fc675f388ef7b208538e9dab8a3
|
|
4
|
+
data.tar.gz: fd9ab2693a0bf87c6230330ac8c4e046c585c420ecbdce0b77b06a6b652fd266
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6cc612c51d2b89e7ecfd3ea6879eb3e731a8ce96cba961863119a34b9dd094b0e5c139045d0c0cdf0df964130ec0e65a9df4961defe6843603767e9369b60800
|
|
7
|
+
data.tar.gz: ff1caf1d8012504204f5d793b577c0c3603ba2d156257786a32fab73618d52971d0c49edfba0860f9a5ad9dd56e34dca272891e594b55521761f514fd8fdc053
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.8.2 (2026-11-02)
|
|
4
|
+
|
|
5
|
+
### Queue Naming
|
|
6
|
+
- **[Fix]** The `InvalidQueueNameError` message for a too-long queue name states the real limit: "exceeds maximum
|
|
7
|
+
length of 47 characters" (was 48; a 48-character name was already rejected). The README now gives 47 as the maximum
|
|
8
|
+
and no longer calls queue names case-sensitive: names differing only in case share one table (PGMQ lower-cases
|
|
9
|
+
table names) but get separate `pgmq.meta` rows, so use one spelling per queue.### Documentation
|
|
10
|
+
- **[Fix]** The README `wait_for_notify` example said the call returns the notification payload; it returns the
|
|
11
|
+
channel name (`nil` on timeout).
|
|
12
|
+
|
|
3
13
|
## 0.8.1 (2026-10-30)
|
|
4
14
|
|
|
5
15
|
### Producer
|
data/README.md
CHANGED
|
@@ -23,7 +23,7 @@ PGMQ-Ruby is a Ruby client for PGMQ (PostgreSQL Message Queue). It provides dire
|
|
|
23
23
|
- [Requirements](#requirements)
|
|
24
24
|
- [Installation](#installation)
|
|
25
25
|
- [Quick Start](#quick-start)
|
|
26
|
-
- [
|
|
26
|
+
- [Connection Options](#connection-options)
|
|
27
27
|
- [API Reference](#api-reference)
|
|
28
28
|
- [Queue Management](#queue-management)
|
|
29
29
|
- [Sending Messages](#sending-messages)
|
|
@@ -91,7 +91,7 @@ This gem provides complete support for all core PGMQ SQL functions. Based on the
|
|
|
91
91
|
| | Conditional Filtering | Server-side JSONB filtering with `conditional:` | ✅ |
|
|
92
92
|
| | Multi-Queue Ops | Read/pop/delete/archive from multiple queues | ✅ |
|
|
93
93
|
| | Consumer | Minimal single-threaded `PGMQ::Consumer` loop over one or more queues with ack on success | ✅ |
|
|
94
|
-
| | Queue Validation |
|
|
94
|
+
| | Queue Validation | 47-character limit and name validation | ✅ |
|
|
95
95
|
| | Connection Pooling | Thread-safe connection pool for concurrency | ✅ |
|
|
96
96
|
| | Pluggable Serializers | JSON (default) with custom serializer support | ✅ |
|
|
97
97
|
|
|
@@ -427,10 +427,11 @@ queues = client.list_queues
|
|
|
427
427
|
|
|
428
428
|
Queue names must follow PostgreSQL identifier rules with PGMQ-specific constraints:
|
|
429
429
|
|
|
430
|
-
- **Maximum
|
|
430
|
+
- **Maximum 47 characters** (PGMQ enforces this limit for table prefixes)
|
|
431
431
|
- Must start with a letter or underscore
|
|
432
432
|
- Can contain only letters, digits, and underscores
|
|
433
|
-
-
|
|
433
|
+
- Names that differ only in case (`Orders`, `orders`) share one message table, because PGMQ lower-cases table names.
|
|
434
|
+
PGMQ still registers each spelling separately in `pgmq.meta`, so always use one spelling per queue (e.g. lower case)
|
|
434
435
|
|
|
435
436
|
**Valid Queue Names:**
|
|
436
437
|
|
|
@@ -881,7 +882,7 @@ end
|
|
|
881
882
|
client.disable_notify_insert("queue_name")
|
|
882
883
|
|
|
883
884
|
# Block until a NOTIFY arrives on the queue's channel (or timeout expires)
|
|
884
|
-
# Returns the
|
|
885
|
+
# Returns the channel name on notification, nil on timeout
|
|
885
886
|
client.wait_for_notify("queue_name", timeout: 5)
|
|
886
887
|
|
|
887
888
|
# Block form — inspect notification metadata
|
data/lib/pgmq/queue_name.rb
CHANGED
|
@@ -28,8 +28,8 @@ module PGMQ
|
|
|
28
28
|
# PGMQ::QueueName.sanitize!("!!!") # => raises InvalidQueueNameError
|
|
29
29
|
# PGMQ::QueueName.sanitize("99 Problems!") # => "q_99_problems"
|
|
30
30
|
module QueueName
|
|
31
|
-
#
|
|
32
|
-
# characters; PGMQ
|
|
31
|
+
# Queue names must be shorter than this. PGMQ creates tables with prefixes (+q_+, +a_+) and PostgreSQL caps
|
|
32
|
+
# identifiers at 63 characters; PGMQ rejects names of 48+ characters to leave room for those prefixes and suffixes.
|
|
33
33
|
MAX_LENGTH = 48
|
|
34
34
|
|
|
35
35
|
# A valid queue name: starts with a letter or underscore, then letters, digits, or underscores.
|
|
@@ -67,7 +67,7 @@ module PGMQ
|
|
|
67
67
|
|
|
68
68
|
if str.length >= MAX_LENGTH
|
|
69
69
|
raise Errors::InvalidQueueNameError,
|
|
70
|
-
"Queue name '#{str}' exceeds maximum length of #{MAX_LENGTH} characters " \
|
|
70
|
+
"Queue name '#{str}' exceeds maximum length of #{MAX_LENGTH - 1} characters " \
|
|
71
71
|
"(current length: #{str.length})"
|
|
72
72
|
end
|
|
73
73
|
|
data/lib/pgmq/version.rb
CHANGED