omq-rs 0.2.1 → 0.2.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 +17 -0
- data/ext/omq_rs_native/Cargo.toml +3 -3
- data/ext/omq_rs_native/src/auth.rs +12 -9
- data/ext/omq_rs_native/src/runtime.rs +1 -2
- data/lib/omq/rs/socket.rb +13 -4
- 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: d5a85f425bd17cae88da025400c5f94a48609080237b98c14216edaf27bea181
|
|
4
|
+
data.tar.gz: 731ee17d2af2724503eed4eda48c680fd64966e7e9fcb5bc0a7a5d3a812885b7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9f6f2bd5d1884466f94d3ac77ce7f6a9dba26ff7170b0fa0ef5d357bc2db78cec3f8b5ab73def6f470634d8000a3f396423bcf53fd4648cf4730abc7ef60b208
|
|
7
|
+
data.tar.gz: 7f59d151b72aa53b345420ea286056aca848d76f7cb9d86fefa3594af3112a69d3c0645cdd16ce2d3c7c1e435bcf0002b9c8347086470b90ac67d8fdb9291d64
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.2.2] - 2026-10-07
|
|
6
|
+
|
|
7
|
+
- Bundle `omq-tokio` 0.25.0 and `omq-proto` 0.29.0 with bounded receive
|
|
8
|
+
queues, ZMTP compliance fixes, and reconnect improvements.
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- Name authentication worker threads so lifecycle checks track owned workers.
|
|
13
|
+
- Require `omq-proto` 0.29.0, `omq-tokio` 0.25.0, and published
|
|
14
|
+
`yring` 0.3.20.
|
|
15
|
+
Workspace checks now exercise the current core through local patches.
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
|
|
19
|
+
- Subscribe to monitor events before socket materialization returns. Arm monitor
|
|
20
|
+
waits before polling and retry stale wakes within the receive deadline.
|
|
21
|
+
|
|
5
22
|
## [0.2.1] - 2026-09-19
|
|
6
23
|
|
|
7
24
|
### Changed
|
|
@@ -20,9 +20,9 @@ zstd = ["omq-tokio/zstd"]
|
|
|
20
20
|
ws = ["omq-tokio/ws"]
|
|
21
21
|
|
|
22
22
|
[dependencies]
|
|
23
|
-
omq-proto = { version = "
|
|
24
|
-
omq-tokio = { version = "
|
|
25
|
-
yring = { version = "
|
|
23
|
+
omq-proto = { version = "0.29.0", default-features = false }
|
|
24
|
+
omq-tokio = { version = "0.25.0", default-features = false }
|
|
25
|
+
yring = { version = "0.3.20", features = ["async"] }
|
|
26
26
|
|
|
27
27
|
bytes = "1.12.0"
|
|
28
28
|
flume = { version = "0.12", default-features = false, features = ["async"] }
|
|
@@ -182,6 +182,7 @@ pub fn allowed_keys(value: VALUE) -> RbResult<omq_proto::Authenticator> {
|
|
|
182
182
|
}
|
|
183
183
|
|
|
184
184
|
pub fn callback(callback: VALUE) -> RbResult<(omq_proto::Authenticator, AuthWorker)> {
|
|
185
|
+
let thread_name = rb::new_utf8_string("omq-auth")?;
|
|
185
186
|
let (sender, receiver) = flume::unbounded();
|
|
186
187
|
let notify = Arc::new(PipeNotify::new());
|
|
187
188
|
let data = Box::new(WorkerData {
|
|
@@ -219,13 +220,15 @@ pub fn callback(callback: VALUE) -> RbResult<(omq_proto::Authenticator, AuthWork
|
|
|
219
220
|
auth_notify.notify();
|
|
220
221
|
result.recv().unwrap_or(false)
|
|
221
222
|
});
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
223
|
+
let worker = AuthWorker {
|
|
224
|
+
sender,
|
|
225
|
+
notify,
|
|
226
|
+
callback,
|
|
227
|
+
thread,
|
|
228
|
+
};
|
|
229
|
+
if let Err(error) = rb::call_method_1(thread, c"name=", thread_name) {
|
|
230
|
+
worker.stop();
|
|
231
|
+
return Err(error);
|
|
232
|
+
}
|
|
233
|
+
Ok((authenticator, worker))
|
|
231
234
|
}
|
|
@@ -363,10 +363,9 @@ pub fn materialize(
|
|
|
363
363
|
}
|
|
364
364
|
});
|
|
365
365
|
|
|
366
|
-
let
|
|
366
|
+
let mut stream = sock.monitor();
|
|
367
367
|
let peer_ready_sock = sock.clone();
|
|
368
368
|
let monitor_pump = tokio::spawn(async move {
|
|
369
|
-
let mut stream = monitor_sock.monitor();
|
|
370
369
|
let mut peer_count: u32 = 0;
|
|
371
370
|
let mut had_peers = false;
|
|
372
371
|
let mut peer_connected_fired = false;
|
data/lib/omq/rs/socket.rb
CHANGED
|
@@ -641,11 +641,20 @@ module OMQ
|
|
|
641
641
|
return if closed?
|
|
642
642
|
|
|
643
643
|
ensure_materialized
|
|
644
|
-
|
|
645
|
-
return event if event
|
|
644
|
+
deadline = Process.clock_gettime(Process::CLOCK_MONOTONIC) + timeout if timeout
|
|
646
645
|
|
|
647
|
-
|
|
648
|
-
|
|
646
|
+
loop do
|
|
647
|
+
return if closed?
|
|
648
|
+
|
|
649
|
+
fd = @native.monitor_fd
|
|
650
|
+
event = @native.try_recv_monitor
|
|
651
|
+
return event if event
|
|
652
|
+
|
|
653
|
+
remaining = deadline - Process.clock_gettime(Process::CLOCK_MONOTONIC) if deadline
|
|
654
|
+
raise IO::TimeoutError, "monitor receive timed out" if remaining && remaining <= 0
|
|
655
|
+
|
|
656
|
+
wait_for_native_fd(fd, remaining, "monitor receive timed out")
|
|
657
|
+
end
|
|
649
658
|
end
|
|
650
659
|
|
|
651
660
|
# Attempts to receive monitor event without blocking.
|
data/lib/omq/rs/version.rb
CHANGED