amqp 1.4.0 → 1.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a27af25790fbbfceee41b2ed96246b3e3736624a
4
- data.tar.gz: 2dbac00d7f5e582cb91c6b6fa4ee4510fcceb8df
3
+ metadata.gz: 505c99ff4d142a7284d3b96a17efa6d284d1dcf0
4
+ data.tar.gz: c9c53b83f8a3aaac97723fdcb259da861843712a
5
5
  SHA512:
6
- metadata.gz: 8f218bcdf94cd7e0a02a82717860c63d8476a7a48ab08c965a9639197d6cdb815a3fb18ca4c7ac4de73bd8ef78aae594b8cca4fd6c3c25ce59499ef2ee9acddf
7
- data.tar.gz: 21df041f087ba88c6fd67f64c9a12869c411f48cdd270d9e16fe6578df5d80f7631094de05e7cc920bc9c9fdf7c5be07f6a0be55bdfe424b2aa432e3a04bc98b
6
+ metadata.gz: c739321a577b28bebaac53a7ae8f62926247113195b3af9be44f44df2a97e5f43e3ec9ef55faa398726d18664d918fbef73c214d75799b93e91f686eb1b77943
7
+ data.tar.gz: af3a458405c5961af2d974e46148d0ef86e7d396b467bc0a74de6fbd19fbc684cf4e75853888a5d0c1c3af50ae0b7a8b479c53a73867b0dbe25789e34d5e284c
@@ -1,3 +1,13 @@
1
+ ## Changes Between 1.4.0 and 1.4.1
2
+
3
+ ### Server-Named Queue Recovery Fix
4
+
5
+ Server-named queues are now correctly recovered again.
6
+
7
+ Contributed by Jack C Hong.
8
+
9
+
10
+
1
11
  ## Changes Between 1.3.x and 1.4.0
2
12
 
3
13
  ### connection.blocked Support
@@ -12,7 +12,7 @@ puts "=> Example of automatic AMQP channel and queues recovery"
12
12
  puts
13
13
  AMQP.start(:host => ENV.fetch("BROKER_HOST", "localhost")) do |connection, open_ok|
14
14
  connection.on_error do |ch, connection_close|
15
- raise connection_close.reply_text
15
+ puts "[connection closed] #{connection_close.reply_text}"
16
16
  end
17
17
 
18
18
  ch1 = AMQP::Channel.new(connection, :auto_recovery => true)
@@ -12,7 +12,7 @@ puts "=> Example of automatic AMQP channel and queues recovery"
12
12
  puts
13
13
  AMQP.start(:host => "localhost") do |connection, open_ok|
14
14
  connection.on_error do |ch, connection_close|
15
- raise connection_close.reply_text
15
+ puts "[connection closed] #{connection_close.reply_text}"
16
16
  end
17
17
 
18
18
  ch1 = AMQP::Channel.new(connection, 2, :auto_recovery => true)
@@ -354,43 +354,6 @@ module AMQP
354
354
  end
355
355
 
356
356
 
357
- # @group Error Handling and Recovery
358
-
359
- # Used by automatic recovery machinery.
360
- # @private
361
- # @api plugin
362
- def rebind(&block)
363
- @bindings.each { |b| self.bind(b[:exchange], b) }
364
- end
365
-
366
- # Called by associated connection object when AMQP connection has been re-established
367
- # (for example, after a network failure).
368
- #
369
- # @api plugin
370
- def auto_recover
371
- self.exec_callback_yielding_self(:before_recovery)
372
-
373
- if self.server_named?
374
- old_name = @name.dup
375
- @name = AMQ::Protocol::EMPTY_STRING
376
-
377
- @channel.queues.delete(old_name)
378
- end
379
-
380
- self.redeclare do
381
- self.rebind
382
-
383
- @consumers.each { |tag, consumer| consumer.auto_recover }
384
-
385
- self.exec_callback_yielding_self(:after_recovery)
386
- end
387
- end # auto_recover
388
-
389
- # @endgroup
390
-
391
-
392
-
393
-
394
357
  # Remove the binding between the queue and exchange. The queue will
395
358
  # not receive any more messages until it is bound to another
396
359
  # exchange.
@@ -1223,9 +1186,38 @@ module AMQP
1223
1186
 
1224
1187
 
1225
1188
 
1226
-
1227
1189
  # @group Error Handling & Recovery
1228
1190
 
1191
+ # Used by automatic recovery machinery.
1192
+ # @private
1193
+ # @api api
1194
+ def rebind(&block)
1195
+ @bindings.each { |b| self.bind(b[:exchange], b) }
1196
+ end
1197
+
1198
+ # Called by associated connection object when AMQP connection has been re-established
1199
+ # (for example, after a network failure).
1200
+ #
1201
+ # @api api
1202
+ def auto_recover
1203
+ self.exec_callback_yielding_self(:before_recovery)
1204
+
1205
+ if self.server_named?
1206
+ old_name = @name.dup
1207
+ @name = AMQ::Protocol::EMPTY_STRING
1208
+
1209
+ @channel.queues.delete(old_name)
1210
+ end
1211
+
1212
+ self.redeclare do
1213
+ self.rebind
1214
+
1215
+ @consumers.each { |tag, consumer| consumer.auto_recover }
1216
+
1217
+ self.exec_callback_yielding_self(:after_recovery)
1218
+ end
1219
+ end # auto_recover
1220
+
1229
1221
  # Defines a callback that will be executed after TCP connection is interrupted (typically because of a network failure).
1230
1222
  # Only one callback can be defined (the one defined last replaces previously added ones).
1231
1223
  #
@@ -1268,23 +1260,6 @@ module AMQP
1268
1260
  @consumers.each { |tag, c| c.run_after_recovery_callbacks }
1269
1261
  end
1270
1262
 
1271
-
1272
-
1273
- # Called by associated connection object when AMQP connection has been re-established
1274
- # (for example, after a network failure).
1275
- #
1276
- # @api plugin
1277
- def auto_recover
1278
- self.exec_callback_yielding_self(:before_recovery)
1279
- self.redeclare do
1280
- self.rebind
1281
-
1282
- @consumers.each { |tag, consumer| consumer.auto_recover }
1283
-
1284
- self.exec_callback_yielding_self(:after_recovery)
1285
- end
1286
- end # auto_recover
1287
-
1288
1263
  # @endgroup
1289
1264
 
1290
1265
 
@@ -6,5 +6,5 @@ module AMQP
6
6
  #
7
7
  # @see AMQ::Protocol::VERSION
8
8
  # @return [String] AMQP gem version
9
- VERSION = '1.4.0'
9
+ VERSION = '1.4.1'
10
10
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: amqp
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aman Gupta
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2014-06-24 00:00:00.000000000 Z
13
+ date: 2014-07-09 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: eventmachine