omq 0.28.8 → 0.28.9

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6ed8a560eb7abf29a97bdae6a35baaf18bfe1ef47476a33691f7d5ad2fdf2914
4
- data.tar.gz: 91b6416e4ce9110cf13f73bd7a7b8fdc97b994132f718f99f3dcd2cff4030857
3
+ metadata.gz: 69989ec63abfcf84fc4a2c6fb6900601a426da84efceda4214756d6cfe6c5730
4
+ data.tar.gz: 8fd5f283d00aa4b41e9a43bf9fd0f9d818e8a33fdfb6e8fba300b815cb87581d
5
5
  SHA512:
6
- metadata.gz: 41fbe26e73c2dae30b30a74ba347e9c1a52781ec13d7ecc4ee98f80e715e8a3c83f95a47adeac5294238a1cc29b8359bc1c7b6ae96320036855f789062b87eb7
7
- data.tar.gz: 539696d1162ac357f319664657a33cb3cada7d6968a42b1cf3855498fee1ec1deaa1ff6ab340860c536784cfde2d53328496f7014c398b933ab36843ff86a02a
6
+ metadata.gz: c6a18373a24aee32befeb94f684770f23784417af36f9d6d60475ee1969559105ff4403223dea44caeeafcfe3e18899a6f0e95493a4e05486336a15b37933194
7
+ data.tar.gz: 21e86d33a77985738681f0d248214ccf5b85c2dde32e8efcf94b673ac1323d6a8c434c6b9b04a6315374b4eb129924ab5801af341f79aceb983c33056904f789
data/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.28.9] - 2026-08-26
6
+
7
+ ### Fixed
8
+
9
+ - Used `SocketError` when `Socket::ResolutionError` is unavailable, so
10
+ `require "omq"` works on JRuby.
11
+
5
12
  ## [0.28.8] - 2026-08-08
6
13
 
7
14
  ### Added
data/README.md CHANGED
@@ -61,9 +61,12 @@ gem 'omq'
61
61
 
62
62
  ### Ruby Engines
63
63
 
64
- MRI Ruby 3.3 and 4.0 can use the pure Ruby backend. TruffleRuby should use
65
- the Rust backend with `backend: :rust`; the pure Ruby backend is not supported
66
- there because OMQ needs native `Fiber.scheduler` behavior.
64
+ MRI Ruby 3.3 and 4.0 can use the pure Ruby backend. TruffleRuby and JRuby
65
+ should use the Rust backend with `backend: :rust`; the pure Ruby backend is
66
+ not supported there because OMQ needs native `Fiber.scheduler` behavior.
67
+ JRuby support uses OMQ.java on Java 25 or newer. The Java gem selects the
68
+ matching OMQ.java artifact on Linux x86_64, macOS aarch64, macOS x86_64, and
69
+ Windows x86_64.
67
70
 
68
71
  ## Quick Start
69
72
 
@@ -223,8 +226,8 @@ See the [omq-cli README](https://github.com/paddor/omq-cli) for full documentati
223
226
 
224
227
  ## Optional Rust backend
225
228
 
226
- Install `omq-backend-rust` for a Rust/omq-tokio backend. Same socket API,
227
- but connection handling runs in native code on a Tokio runtime.
229
+ Install `omq-backend-rust` for an OMQ.rs backend through the first-class
230
+ `omq-rs` binding. Same socket API, with connection handling on a Tokio runtime.
228
231
 
229
232
  The Rust backend also supports TruffleRuby. The pure Ruby backend currently
230
233
  requires MRI-style native `Fiber.scheduler` support, so use `backend: :rust`
data/lib/omq/constants.rb CHANGED
@@ -43,6 +43,7 @@ module OMQ
43
43
  IO::Stream::ConnectionResetError,
44
44
  ]
45
45
 
46
+ RESOLUTION_ERROR = defined?(Socket::ResolutionError) ? Socket::ResolutionError : SocketError
46
47
 
47
48
  # Errors raised when a peer cannot be reached.
48
49
  CONNECTION_FAILED = [
@@ -52,7 +53,7 @@ module OMQ
52
53
  Errno::EHOSTUNREACH,
53
54
  Errno::ENETUNREACH,
54
55
  Errno::EPROTOTYPE, # IPC: existing socket file is SOCK_DGRAM, not SOCK_STREAM
55
- Socket::ResolutionError,
56
+ RESOLUTION_ERROR,
56
57
  ]
57
58
 
58
59
 
data/lib/omq/reactor.rb CHANGED
@@ -17,7 +17,9 @@ module OMQ
17
17
  #
18
18
  module Reactor
19
19
  THREAD_NAME = 'omq-io'
20
- NATIVE_FIBER_SCHEDULER = Fiber.respond_to?(:scheduler) && Fiber.method(:scheduler).source_location.nil?
20
+ NATIVE_FIBER_SCHEDULER = RUBY_ENGINE != "jruby" &&
21
+ Fiber.respond_to?(:scheduler) &&
22
+ Fiber.method(:scheduler).source_location.nil?
21
23
 
22
24
  @mutex = Mutex.new
23
25
  @pid = nil
data/lib/omq/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module OMQ
4
- VERSION = "0.28.8"
4
+ VERSION = "0.28.9"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omq
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.28.8
4
+ version: 0.28.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patrik Wenger