amqp 1.1.8 → 1.2.0
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/.travis.yml +0 -1
- data/ChangeLog.md +20 -29
- data/README.md +5 -1
- data/lib/amqp/channel.rb +4 -2
- data/lib/amqp/channel_id_allocator.rb +1 -1
- data/lib/amqp/session.rb +6 -28
- data/lib/amqp/version.rb +1 -1
- data/spec/integration/queue_declaration_spec.rb +1 -0
- data/spec/unit/amqp/channel_id_allocation_spec.rb +6 -6
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bd66c91f55ab8045cc63d46592f2e909ae43dccf
|
4
|
+
data.tar.gz: 2cd03735c97ee93a70b0fe43ee027e909f1e7c52
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5fcd3df4e73c1d14209b9bd9036cadf708e4e8869f15b16bab775a13b0f796a1f55f9bdcbad5d9f12dc039eb1c17e8eb79e1eebca0b41d9e151e64694ac97625
|
7
|
+
data.tar.gz: 679dca56fb7b1dd36ab7eec48eb8a70249e7ec7117c2405436feaa2c6c7863ba7cc1c1b2acc52fc5d28ac7e5568c501859a136458df400ce53b4578e67322507
|
data/.travis.yml
CHANGED
data/ChangeLog.md
CHANGED
@@ -1,11 +1,23 @@
|
|
1
|
-
## Changes Between 1.1.
|
1
|
+
## Changes Between 1.1.0 and 1.2.0
|
2
2
|
|
3
|
-
###
|
3
|
+
### [Authentication Failure Notification](http://www.rabbitmq.com/auth-notification.html) Support
|
4
4
|
|
5
|
-
|
5
|
+
amqp gem now supports [Authentication Failure
|
6
|
+
Notification](http://www.rabbitmq.com/auth-notification.html). Public
|
7
|
+
API for authentication failure handling hasn't changed.
|
8
|
+
|
9
|
+
This extension is available in RabbitMQ 3.2+.
|
6
10
|
|
11
|
+
## basic.qos Recovery Fix
|
7
12
|
|
8
|
-
|
13
|
+
`basic.qos` setting will now be recovered first thing after
|
14
|
+
channel recovery, to the most recent value passed via `:prefetch` channel
|
15
|
+
constructor option or `AMQP::Channel#prefetch`.
|
16
|
+
|
17
|
+
|
18
|
+
### amq-protocol Update
|
19
|
+
|
20
|
+
Minimum `amq-protocol` version is now `1.9.2`.
|
9
21
|
|
10
22
|
### Automatic Recovery Fix
|
11
23
|
|
@@ -14,52 +26,31 @@ Automatic connection recovery now correctly recovers bindings again.
|
|
14
26
|
Contributed by Devin Christensen.
|
15
27
|
|
16
28
|
|
17
|
-
## Changes Between 1.1.5 and 1.1.6
|
18
|
-
|
19
29
|
### 65535 Channels Per Connection
|
20
30
|
|
21
|
-
amqp gem now allows for
|
31
|
+
amqp gem now allows for 65535 channels per connection and
|
22
32
|
not Ruby process.
|
23
33
|
|
24
34
|
Contributed by Neo (http://neo.com) developers.
|
25
35
|
|
26
|
-
|
27
|
-
## Changes Between 1.1.4 and 1.1.5
|
28
|
-
|
29
36
|
### channel.close is Delayed Until After Channel is Open
|
30
37
|
|
31
38
|
This eliminates a race condition in some codebases that use
|
32
39
|
very short lived channels.
|
33
40
|
|
34
|
-
|
35
|
-
## Changes Between 1.1.3 and 1.1.4
|
36
|
-
|
37
41
|
### ConnectionClosedError is Back
|
38
42
|
|
39
|
-
`ConnectionClosedError` is now defined again.
|
40
|
-
|
41
|
-
|
42
|
-
## Changes Between 1.1.2 and 1.1.3
|
43
|
-
|
44
|
-
### Fixed Exception in AMQP::Exchange#handle_declare_ok
|
43
|
+
`ConnectionClosedError` from `amq-client` is now defined again.
|
45
44
|
|
46
|
-
`AMQP::Exchange#handle_declare_ok` no longer raises an exception
|
47
|
-
about undefined method.
|
48
|
-
|
49
|
-
|
50
|
-
## Changes Between 1.1.1 and 1.1.2
|
51
45
|
|
52
46
|
### amq-protocol Update
|
53
47
|
|
54
48
|
Minimum `amq-protocol` version is now `1.9.0`.
|
55
49
|
|
56
|
-
|
57
|
-
## Changes Between 1.1.0 and 1.1.1
|
58
|
-
|
59
|
-
### Fixed Exception in AMQP::Exchange#handle_declare_ok
|
50
|
+
### Fixed Exceptions in AMQP::Exchange#handle_declare_ok
|
60
51
|
|
61
52
|
`AMQP::Exchange#handle_declare_ok` no longer raises an exception
|
62
|
-
about undefined
|
53
|
+
about undefined methods `#anonymous?` and `#exchange`.
|
63
54
|
|
64
55
|
|
65
56
|
## Changes Between 1.0.0 and 1.1.0
|
data/README.md
CHANGED
@@ -220,7 +220,7 @@ AMQP gem is licensed under the [Ruby License](http://www.ruby-lang.org/en/LICENS
|
|
220
220
|
* The Initial Developer of the Original Code is Aman Gupta.
|
221
221
|
* Copyright (c) 2008 - 2010 [Aman Gupta](http://github.com/tmm1).
|
222
222
|
* Contributions from [Jakub Stastny](http://github.com/botanicus) are Copyright (c) 2011-2012 VMware, Inc.
|
223
|
-
* Copyright (c) 2010 —
|
223
|
+
* Copyright (c) 2010 — 2014 [ruby-amqp](https://github.com/ruby-amqp) group members.
|
224
224
|
|
225
225
|
Currently maintained by [ruby-amqp](https://github.com/ruby-amqp) group members
|
226
226
|
Special thanks to Dmitriy Samovskiy, Ben Hood and Tony Garnock-Jones.
|
@@ -273,3 +273,7 @@ we do not expect this to change at this time.
|
|
273
273
|
### How does amqp gem relate to amq-client gem, amq-protocol and libraries like Bunny?
|
274
274
|
|
275
275
|
See [this page about AMQP gems family](https://github.com/ruby-amqp/amq-client/blob/master/README.textile)
|
276
|
+
|
277
|
+
|
278
|
+
[](https://bitdeli.com/free "Bitdeli Badge")
|
279
|
+
|
data/lib/amqp/channel.rb
CHANGED
@@ -295,7 +295,7 @@ module AMQP
|
|
295
295
|
end # case
|
296
296
|
end # if
|
297
297
|
|
298
|
-
self.prefetch(options[:prefetch], false) if options[:prefetch]
|
298
|
+
self.prefetch(@options[:prefetch], false) if @options[:prefetch]
|
299
299
|
end # self.open
|
300
300
|
end # @connection.on_open
|
301
301
|
end
|
@@ -997,8 +997,10 @@ module AMQP
|
|
997
997
|
# @api public
|
998
998
|
def prefetch(count, global = false, &block)
|
999
999
|
self.once_open do
|
1000
|
-
# RabbitMQ
|
1000
|
+
# RabbitMQ does not support prefetch_size.
|
1001
1001
|
self.qos(0, count, global, &block)
|
1002
|
+
|
1003
|
+
@options[:prefetch] = count
|
1002
1004
|
end
|
1003
1005
|
|
1004
1006
|
self
|
data/lib/amqp/session.rb
CHANGED
@@ -148,25 +148,6 @@ module AMQP
|
|
148
148
|
settings[:logging] = boolean
|
149
149
|
end
|
150
150
|
|
151
|
-
|
152
|
-
# Establishes connection to AMQ broker and returns it. New connection object is yielded to
|
153
|
-
# the block if it is given.
|
154
|
-
#
|
155
|
-
# @example Specifying adapter via the :adapter option
|
156
|
-
# AMQP::Adapter.connect(:adapter => "socket")
|
157
|
-
# @example Specifying using custom adapter class
|
158
|
-
# AMQP::SocketClient.connect
|
159
|
-
# @param [Hash] Connection parameters, including :adapter to use.
|
160
|
-
# @api public
|
161
|
-
def connect(settings = nil, &block)
|
162
|
-
@settings = Settings.configure(settings)
|
163
|
-
|
164
|
-
instance = self.new
|
165
|
-
instance.establish_connection(settings)
|
166
|
-
instance.register_connection_callback(&block)
|
167
|
-
|
168
|
-
instance
|
169
|
-
end
|
170
151
|
end
|
171
152
|
|
172
153
|
|
@@ -533,15 +514,6 @@ module AMQP
|
|
533
514
|
end
|
534
515
|
end
|
535
516
|
|
536
|
-
|
537
|
-
|
538
|
-
# For EventMachine adapter, this is a no-op.
|
539
|
-
# @api public
|
540
|
-
def establish_connection(settings)
|
541
|
-
# Unfortunately there doesn't seem to be any sane way
|
542
|
-
# how to get EventMachine connect to the instance level.
|
543
|
-
end
|
544
|
-
|
545
517
|
alias close disconnect
|
546
518
|
|
547
519
|
|
@@ -1056,6 +1028,12 @@ module AMQP
|
|
1056
1028
|
# @see http://bit.ly/amqp091reference AMQP 0.9.1 protocol reference (Section 1.5.2.9)
|
1057
1029
|
def handle_close(conn_close)
|
1058
1030
|
closed!
|
1031
|
+
# getting connection.close during connection negotiation means authentication
|
1032
|
+
# has failed (RabbitMQ 3.2+):
|
1033
|
+
# http://www.rabbitmq.com/auth-notification.html
|
1034
|
+
if authenticating?
|
1035
|
+
@on_possible_authentication_failure.call(@settings) if @on_possible_authentication_failure
|
1036
|
+
end
|
1059
1037
|
self.exec_callback_yielding_self(:error, conn_close)
|
1060
1038
|
end
|
1061
1039
|
|
data/lib/amqp/version.rb
CHANGED
@@ -9,7 +9,7 @@ describe AMQP::ChannelIdAllocator do
|
|
9
9
|
|
10
10
|
describe "#next_channel_id" do
|
11
11
|
subject do
|
12
|
-
ChannelAllocator.new
|
12
|
+
ChannelAllocator.new
|
13
13
|
end
|
14
14
|
|
15
15
|
context "when there is a channel id available for allocation" do
|
@@ -20,7 +20,7 @@ describe AMQP::ChannelIdAllocator do
|
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
23
|
-
context "when THERE IS
|
23
|
+
context "when THERE IS NO a channel id available for allocation" do
|
24
24
|
it "raises an exception" do
|
25
25
|
(ChannelAllocator::MAX_CHANNELS_PER_CONNECTION - 1).times do
|
26
26
|
subject.next_channel_id
|
@@ -34,7 +34,7 @@ describe AMQP::ChannelIdAllocator do
|
|
34
34
|
|
35
35
|
describe ".release_channel_id" do
|
36
36
|
subject do
|
37
|
-
ChannelAllocator.new
|
37
|
+
ChannelAllocator.new
|
38
38
|
end
|
39
39
|
|
40
40
|
it "releases that channel id" do
|
@@ -49,12 +49,12 @@ describe AMQP::ChannelIdAllocator do
|
|
49
49
|
|
50
50
|
describe "each instance gets its own channel IDs" do
|
51
51
|
it "has an allocator per instance" do
|
52
|
-
one = ChannelAllocator.new
|
53
|
-
two = ChannelAllocator.new
|
52
|
+
one = ChannelAllocator.new
|
53
|
+
two = ChannelAllocator.new
|
54
54
|
one.next_channel_id.should == 1
|
55
55
|
one.next_channel_id.should == 2
|
56
56
|
two.next_channel_id.should == 1
|
57
57
|
two.next_channel_id.should == 2
|
58
58
|
end
|
59
59
|
end
|
60
|
-
end
|
60
|
+
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
|
+
version: 1.2.0
|
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:
|
13
|
+
date: 2014-01-14 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: eventmachine
|