omq-rs 0.2.14 → 0.3.0
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 +25 -0
- data/ext/omq_rs_native/Cargo.toml +3 -3
- data/ext/omq_rs_native/src/options.rs +16 -1
- data/lib/omq/rs/socket.rb +6 -0
- data/lib/omq/rs/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: 174421b8bc97d06b5c6b41ef72d4110bbe515ee34b446b237901562cea46cf8f
|
|
4
|
+
data.tar.gz: de8e503f70e6dbb6aabb2d7a5e6730f94eef816ca7b5b1395f0b707975759cd6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a83ecd2e58ee67bd78cf930e3b10bf9943dd82fd8d5f8040b3fbca1799c5ae4c81d0460d21fe9a50ac6659377f144cde59eb68df58f93f07e8162019355c5217
|
|
7
|
+
data.tar.gz: e1dafb6f0751044d3242988fee815d9e2e922d40992a52baae6f6e1b024765a11b0b87bbed6d2d0f54e2a82903f22d1332dd3cdf58f48b709b6c22eb5ec3ab50
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,31 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.3.0] - 2026-11-14
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- `max_message_parts` limits the parts of one received message (default
|
|
10
|
+
1024). `max_peer_subscriptions` limits the prefixes or groups one peer may
|
|
11
|
+
hold on a PUB, XPUB or RADIO socket (default 65536). A negative value
|
|
12
|
+
removes a limit.
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
15
|
+
|
|
16
|
+
- Bundle `omq-tokio` 0.36.0. Messages queued on a `connect()` route
|
|
17
|
+
survive a reconnect, as in libzmq. A peer that sends more than 1024
|
|
18
|
+
message parts is disconnected, and one peer holds at most 65,536
|
|
19
|
+
subscriptions or groups. An `ipc://` bind on a path with a live
|
|
20
|
+
listener fails.
|
|
21
|
+
|
|
22
|
+
## [0.2.15] - 2026-11-12
|
|
23
|
+
|
|
24
|
+
### Changed
|
|
25
|
+
|
|
26
|
+
- Bundle `omq-tokio` 0.35.1. A connection driver with steady output
|
|
27
|
+
pauses every 16 KiB, so other tasks and timers on its IO thread run on
|
|
28
|
+
time.
|
|
29
|
+
|
|
5
30
|
## [0.2.14] - 2026-11-09
|
|
6
31
|
|
|
7
32
|
### Changed
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
name = "omq_rs_native"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.3.0"
|
|
4
4
|
edition = "2024"
|
|
5
5
|
rust-version = "1.93"
|
|
6
6
|
license = "ISC"
|
|
@@ -20,8 +20,8 @@ zstd = ["omq-tokio/zstd"]
|
|
|
20
20
|
ws = ["omq-tokio/ws"]
|
|
21
21
|
|
|
22
22
|
[dependencies]
|
|
23
|
-
omq-proto = { version = "0.
|
|
24
|
-
omq-tokio = { version = "0.
|
|
23
|
+
omq-proto = { version = "0.40.0", default-features = false }
|
|
24
|
+
omq-tokio = { version = "0.36.0", default-features = false }
|
|
25
25
|
yring = { version = "0.3.21", features = ["async"] }
|
|
26
26
|
|
|
27
27
|
bytes = "1.12.0"
|
|
@@ -97,6 +97,9 @@ fn apply_transport_options(hash: VALUE, opts: &mut omq_tokio::Options) -> RbResu
|
|
|
97
97
|
if let Some(v) = get_opt_usize(hash, "max_message_size")? {
|
|
98
98
|
opts.max_message_size = Some(v);
|
|
99
99
|
}
|
|
100
|
+
if let Some(v) = get_opt_i64(hash, "max_message_parts")? {
|
|
101
|
+
opts.max_message_parts = limit_from_i64(v);
|
|
102
|
+
}
|
|
100
103
|
if let Some(v) = get_opt_usize(hash, "sndbuf")? {
|
|
101
104
|
opts.send_buffer_size = Some(v);
|
|
102
105
|
}
|
|
@@ -115,6 +118,9 @@ fn apply_transport_options(hash: VALUE, opts: &mut omq_tokio::Options) -> RbResu
|
|
|
115
118
|
if let Some(v) = get_opt_bool(hash, "xpub_nodrop")? {
|
|
116
119
|
opts.xpub_nodrop = v;
|
|
117
120
|
}
|
|
121
|
+
if let Some(v) = get_opt_i64(hash, "max_peer_subscriptions")? {
|
|
122
|
+
opts.max_peer_subscriptions = limit_from_i64(v);
|
|
123
|
+
}
|
|
118
124
|
if let Some(v) = get_opt_bool(hash, "reconnect_stop_conn_refused")? {
|
|
119
125
|
opts.reconnect_stop_conn_refused = v;
|
|
120
126
|
}
|
|
@@ -144,7 +150,7 @@ fn apply_compression_options(hash: VALUE, opts: &mut omq_tokio::Options) -> RbRe
|
|
|
144
150
|
}
|
|
145
151
|
if let Some(v) = get_opt_i64(hash, "compression_offload_threshold")? {
|
|
146
152
|
// Negative disables offload.
|
|
147
|
-
opts.compression_offload_threshold =
|
|
153
|
+
opts.compression_offload_threshold = limit_from_i64(v);
|
|
148
154
|
}
|
|
149
155
|
Ok(())
|
|
150
156
|
}
|
|
@@ -407,6 +413,15 @@ fn get_opt_usize(hash: VALUE, key: &str) -> RbResult<Option<usize>> {
|
|
|
407
413
|
.map_err(|_| RubyErr::arg(format!("{key} must be non-negative")))
|
|
408
414
|
}
|
|
409
415
|
|
|
416
|
+
/// A limit that is on by default. A negative value turns it off.
|
|
417
|
+
fn limit_from_i64(value: i64) -> Option<usize> {
|
|
418
|
+
if value < 0 {
|
|
419
|
+
None
|
|
420
|
+
} else {
|
|
421
|
+
Some(value as usize)
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
|
|
410
425
|
fn get_opt_u32(hash: VALUE, key: &str) -> RbResult<Option<u32>> {
|
|
411
426
|
let Some(v) = get_opt_i64(hash, key)? else {
|
|
412
427
|
return Ok(None);
|
data/lib/omq/rs/socket.rb
CHANGED
|
@@ -38,6 +38,7 @@ module OMQ
|
|
|
38
38
|
max_pending_handshakes
|
|
39
39
|
|
|
40
40
|
max_message_size
|
|
41
|
+
max_message_parts
|
|
41
42
|
sndbuf
|
|
42
43
|
rcvbuf
|
|
43
44
|
large_message_threshold
|
|
@@ -45,6 +46,7 @@ module OMQ
|
|
|
45
46
|
transmit_slot_cap
|
|
46
47
|
|
|
47
48
|
xpub_nodrop
|
|
49
|
+
max_peer_subscriptions
|
|
48
50
|
reconnect_stop_conn_refused
|
|
49
51
|
on_mute
|
|
50
52
|
reconnect_interval
|
|
@@ -258,12 +260,16 @@ module OMQ
|
|
|
258
260
|
# @option options [Numeric] :handshake_timeout handshake timeout in seconds
|
|
259
261
|
# @option options [Integer] :max_pending_handshakes inbound handshake limit
|
|
260
262
|
# @option options [Integer] :max_message_size maximum received message bytes
|
|
263
|
+
# @option options [Integer] :max_message_parts maximum parts of one received
|
|
264
|
+
# message, 1024 by default; negative removes the limit
|
|
261
265
|
# @option options [Integer] :sndbuf kernel send buffer bytes
|
|
262
266
|
# @option options [Integer] :rcvbuf kernel receive buffer bytes
|
|
263
267
|
# @option options [Integer] :large_message_threshold receive buffer threshold
|
|
264
268
|
# @option options [Integer] :arena_threshold contiguous frame arena threshold
|
|
265
269
|
# @option options [Integer] :transmit_slot_cap per-peer transmit bytes
|
|
266
270
|
# @option options [Boolean] :xpub_nodrop block instead of dropping on mute
|
|
271
|
+
# @option options [Integer] :max_peer_subscriptions maximum prefixes or groups
|
|
272
|
+
# one peer may hold, 65536 by default; negative removes the limit
|
|
267
273
|
# @option options [Boolean] :reconnect_stop_conn_refused stop refused reconnects
|
|
268
274
|
# @option options [Symbol] :on_mute +:block+, +:drop_newest+, or +:drop_oldest+
|
|
269
275
|
# @option options [Numeric] :reconnect_interval fixed reconnect delay in seconds
|
data/lib/omq/rs/version.rb
CHANGED