amq-client 0.7.0.alpha16 → 0.7.0.alpha17
Sign up to get free protection for your applications and to get access to all the features.
@@ -19,8 +19,8 @@ amq_client_example "Channel-level exception handling" do |client|
|
|
19
19
|
|
20
20
|
|
21
21
|
|
22
|
-
channel.on_error do
|
23
|
-
puts "Oops, there is a channel-
|
22
|
+
channel.on_error do |ch, close|
|
23
|
+
puts "Oops, there is a channel-level exception: #{close.inspect}"
|
24
24
|
|
25
25
|
EM.add_timer(1.2) { show_stopper.call }
|
26
26
|
end
|
data/lib/amq/client/channel.rb
CHANGED
@@ -260,7 +260,7 @@ module AMQ
|
|
260
260
|
end # reset_state!
|
261
261
|
|
262
262
|
|
263
|
-
def handle_connection_interruption(
|
263
|
+
def handle_connection_interruption(method = nil)
|
264
264
|
self.reset_state!
|
265
265
|
end # handle_connection_interruption
|
266
266
|
|
@@ -276,11 +276,11 @@ module AMQ
|
|
276
276
|
self.exec_callback_once_yielding_self(:close, method)
|
277
277
|
end
|
278
278
|
|
279
|
-
def handle_close(method
|
279
|
+
def handle_close(method)
|
280
280
|
self.status = :closed
|
281
281
|
self.exec_callback_yielding_self(:error, method)
|
282
282
|
|
283
|
-
self.handle_connection_interruption(
|
283
|
+
self.handle_connection_interruption(method)
|
284
284
|
end
|
285
285
|
|
286
286
|
# === Handlers ===
|
@@ -301,21 +301,11 @@ module AMQ
|
|
301
301
|
end
|
302
302
|
|
303
303
|
self.handle(Protocol::Channel::Close) do |client, frame|
|
304
|
-
|
305
|
-
|
306
|
-
begin
|
307
|
-
method = frame.decode_payload
|
308
|
-
rescue AMQ::Protocol::Error => e
|
309
|
-
exception = e
|
310
|
-
end
|
304
|
+
method = frame.decode_payload
|
311
305
|
channels = client.connection.channels
|
312
306
|
channel = channels[frame.channel]
|
313
307
|
|
314
|
-
|
315
|
-
channel.handle_close(method, exception)
|
316
|
-
else
|
317
|
-
channel.handle_close(method)
|
318
|
-
end
|
308
|
+
channel.handle_close(method)
|
319
309
|
end
|
320
310
|
|
321
311
|
self.handle(Protocol::Basic::QosOk) do |client, frame|
|
data/lib/amq/client/version.rb
CHANGED
metadata
CHANGED
@@ -1,10 +1,17 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: amq-client
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 1552698946208022717
|
5
5
|
prerelease: 6
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 7
|
9
|
+
- 0
|
10
|
+
- alpha
|
11
|
+
- 17
|
12
|
+
version: 0.7.0.alpha17
|
6
13
|
platform: ruby
|
7
|
-
authors:
|
14
|
+
authors:
|
8
15
|
- Jakub Stastny
|
9
16
|
- Michael S. Klishin
|
10
17
|
- Theo Hultberg
|
@@ -12,41 +19,46 @@ authors:
|
|
12
19
|
autorequire:
|
13
20
|
bindir: bin
|
14
21
|
cert_chain:
|
15
|
-
date: 2011-05-
|
22
|
+
date: 2011-05-04 00:00:00 +04:00
|
16
23
|
default_executable:
|
17
|
-
dependencies:
|
18
|
-
- !ruby/object:Gem::Dependency
|
24
|
+
dependencies:
|
25
|
+
- !ruby/object:Gem::Dependency
|
19
26
|
name: eventmachine
|
20
|
-
|
27
|
+
prerelease: false
|
28
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
21
29
|
none: false
|
22
|
-
requirements:
|
23
|
-
- -
|
24
|
-
- !ruby/object:Gem::Version
|
25
|
-
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
hash: 3
|
34
|
+
segments:
|
35
|
+
- 0
|
36
|
+
version: "0"
|
26
37
|
type: :runtime
|
27
|
-
|
28
|
-
|
29
|
-
- !ruby/object:Gem::Dependency
|
38
|
+
version_requirements: *id001
|
39
|
+
- !ruby/object:Gem::Dependency
|
30
40
|
name: amq-protocol
|
31
|
-
|
41
|
+
prerelease: false
|
42
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
32
43
|
none: false
|
33
|
-
requirements:
|
34
|
-
- -
|
35
|
-
- !ruby/object:Gem::Version
|
36
|
-
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
hash: 3
|
48
|
+
segments:
|
49
|
+
- 0
|
50
|
+
version: "0"
|
37
51
|
type: :runtime
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
cool.io) and supposed to back more opinionated AMQP clients (such as amqp gem, bunny,
|
42
|
-
et cetera) or be used directly in cases when access to more advanced AMQP 0.9.1
|
43
|
-
features is more important that convenient APIs
|
44
|
-
email:
|
52
|
+
version_requirements: *id002
|
53
|
+
description: amq-client supports multiple networking adapters (EventMachine, TCP sockets, cool.io) and supposed to back more opinionated AMQP clients (such as amqp gem, bunny, et cetera) or be used directly in cases when access to more advanced AMQP 0.9.1 features is more important that convenient APIs
|
54
|
+
email:
|
45
55
|
- stastny@101ideas.cz
|
46
56
|
- michael@novemberain.com
|
47
57
|
executables: []
|
58
|
+
|
48
59
|
extensions: []
|
49
|
-
|
60
|
+
|
61
|
+
extra_rdoc_files:
|
50
62
|
- README.textile
|
51
63
|
- doc/_index.html
|
52
64
|
- doc/AMQ.html
|
@@ -57,7 +69,7 @@ extra_rdoc_files:
|
|
57
69
|
- doc/index.html
|
58
70
|
- doc/method_list.html
|
59
71
|
- doc/top-level-namespace.html
|
60
|
-
files:
|
72
|
+
files:
|
61
73
|
- .gitignore
|
62
74
|
- .gitmodules
|
63
75
|
- .rspec
|
@@ -208,26 +220,38 @@ files:
|
|
208
220
|
has_rdoc: true
|
209
221
|
homepage: http://github.com/ruby-amqp/amq-client
|
210
222
|
licenses: []
|
223
|
+
|
211
224
|
post_install_message:
|
212
225
|
rdoc_options: []
|
213
|
-
|
226
|
+
|
227
|
+
require_paths:
|
214
228
|
- lib
|
215
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
229
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
216
230
|
none: false
|
217
|
-
requirements:
|
218
|
-
- -
|
219
|
-
- !ruby/object:Gem::Version
|
220
|
-
|
221
|
-
|
231
|
+
requirements:
|
232
|
+
- - ">="
|
233
|
+
- !ruby/object:Gem::Version
|
234
|
+
hash: 3
|
235
|
+
segments:
|
236
|
+
- 0
|
237
|
+
version: "0"
|
238
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
222
239
|
none: false
|
223
|
-
requirements:
|
224
|
-
- -
|
225
|
-
- !ruby/object:Gem::Version
|
240
|
+
requirements:
|
241
|
+
- - ">"
|
242
|
+
- !ruby/object:Gem::Version
|
243
|
+
hash: 25
|
244
|
+
segments:
|
245
|
+
- 1
|
246
|
+
- 3
|
247
|
+
- 1
|
226
248
|
version: 1.3.1
|
227
249
|
requirements: []
|
250
|
+
|
228
251
|
rubyforge_project: amq-client
|
229
|
-
rubygems_version: 1.
|
252
|
+
rubygems_version: 1.5.2
|
230
253
|
signing_key:
|
231
254
|
specification_version: 3
|
232
255
|
summary: amq-client is a fully-featured, low-level AMQP 0.9.1 client
|
233
256
|
test_files: []
|
257
|
+
|