legion-transport 1.4.29 → 1.4.30
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 +5 -0
- data/lib/legion/transport/queue.rb +13 -4
- data/lib/legion/transport/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: f6143d2993acf25fc55bce28552b4c92e005b4835bd0431dc1f34483022fd29f
|
|
4
|
+
data.tar.gz: 83cc2c75cf8d799e8e79b721e2b252520f74b5daea593161db921cba5d14386c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4705576bed71ba1cdf4fd2d69eedf36fce852cf654f6dc5bcf1b4c16cedb75b4e8163328f097de57400684a4afce808785aa46bfb7a46aae4999e9bc5fc69322
|
|
7
|
+
data.tar.gz: 125eaffbcfed0dd34957e753836db2a3050772f54b7dfc76b5c9cf8cd82a45708e37c40444004ae5c3c49ea91a1631b23062b6277ebaedab722fc8bc06032994
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [1.4.30] - 2026-07-31
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
- Fixed DLX recovery loop (`Bunny::ChannelAlreadyClosed` on `legion.*.dlx` exchanges and queues). The `declare_dlx` method recorded DLX topology on a short-lived channel that was immediately closed after declaration; Bunny's automatic recovery then repeatedly attempted to re-declare on the dead channel, looping forever. Now uses `exchange_declare_without_recording_topology` and `queue_declare_without_recording_topology` so the DLX (durable on the server) is not tracked for client-side recovery. Also added explicit `ChannelAlreadyClosed` handling in `ensure_dlx` and `recreate_dlx` to fail once with context instead of looping.
|
|
9
|
+
|
|
5
10
|
## [1.4.29] - 2026-05-22
|
|
6
11
|
|
|
7
12
|
### Added
|
|
@@ -89,12 +89,18 @@ module Legion
|
|
|
89
89
|
dlx_name = merged_options.dig(:arguments, :'x-dead-letter-exchange')
|
|
90
90
|
return if dlx_name.nil? || dlx_name.empty?
|
|
91
91
|
|
|
92
|
+
session = Legion::Transport::Connection.session
|
|
93
|
+
return unless session&.open?
|
|
94
|
+
|
|
92
95
|
dlx_ch = nil
|
|
93
|
-
dlx_ch =
|
|
96
|
+
dlx_ch = session.create_channel
|
|
94
97
|
declare_dlx(dlx_name, dlx_ch)
|
|
95
98
|
rescue Legion::Transport::CONNECTOR::PreconditionFailed => e
|
|
96
99
|
handle_exception(e, level: :warn, handled: true, operation: 'transport.queue.ensure_dlx', dlx: dlx_name)
|
|
97
100
|
recreate_dlx(dlx_name)
|
|
101
|
+
rescue Legion::Transport::CONNECTOR::ChannelAlreadyClosed => e
|
|
102
|
+
handle_exception(e, level: :warn, handled: true, operation: 'transport.queue.ensure_dlx',
|
|
103
|
+
dlx: dlx_name, detail: 'channel closed during DLX declaration')
|
|
98
104
|
rescue StandardError => e
|
|
99
105
|
handle_exception(e, level: :warn, handled: true, operation: 'transport.queue.ensure_dlx', dlx: dlx_name)
|
|
100
106
|
ensure
|
|
@@ -102,9 +108,9 @@ module Legion
|
|
|
102
108
|
end
|
|
103
109
|
|
|
104
110
|
def declare_dlx(dlx_name, dlx_channel)
|
|
105
|
-
dlx_channel.
|
|
106
|
-
dlx_channel.
|
|
107
|
-
|
|
111
|
+
dlx_channel.exchange_declare_without_recording_topology(dlx_name, 'fanout', durable: true, auto_delete: false)
|
|
112
|
+
dlx_channel.queue_declare_without_recording_topology("#{dlx_name}.queue", durable: true, auto_delete: false,
|
|
113
|
+
arguments: { 'x-queue-type': 'classic' })
|
|
108
114
|
dlx_channel.queue_bind("#{dlx_name}.queue", dlx_name, routing_key: '#')
|
|
109
115
|
end
|
|
110
116
|
|
|
@@ -116,6 +122,9 @@ module Legion
|
|
|
116
122
|
ch.close
|
|
117
123
|
ch = Legion::Transport::Connection.session.create_channel
|
|
118
124
|
declare_dlx(dlx_name, ch)
|
|
125
|
+
rescue Legion::Transport::CONNECTOR::ChannelAlreadyClosed => e
|
|
126
|
+
handle_exception(e, level: :error, handled: true, operation: 'transport.queue.recreate_dlx',
|
|
127
|
+
dlx: dlx_name, detail: 'session channel unavailable during DLX recreation')
|
|
119
128
|
rescue StandardError => e
|
|
120
129
|
handle_exception(e, level: :warn, handled: true, operation: 'transport.queue.recreate_dlx', dlx: dlx_name)
|
|
121
130
|
ensure
|