amqp 0.8.0.rc15 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -1,5 +1,6 @@
1
1
  /*.gem
2
2
  *.rbc
3
+ .rbx/*
3
4
  ~*
4
5
  #*
5
6
  *~
@@ -14,3 +14,7 @@ gemfile:
14
14
  notifications:
15
15
  recipients:
16
16
  - michaelklishin@me.com
17
+ branches:
18
+ only:
19
+ - master
20
+ - 0.7.x-stable
data/CHANGELOG CHANGED
@@ -1,5 +1,6 @@
1
1
  = Version 0.8.0
2
2
 
3
+ * [API] AMQP::Session#on_skipped_heartbeats callback that can be used to handle skipped heartbeats (for cases when TCP network failure detection is not timely enough)
3
4
  * [API] AMQP::Exchange#publish calls now use a mutex on the channel exchange is declared on. Sharing channels between threads is discouraged but amqp gem covers your back in the most dangerous case.
4
5
  * [API] AMQP::Channel#synchronize now can be used to guarantee mutual exclusion of multiple threads on channel instances.
5
6
  * [BUG] Empty messages can finally be published fine. Yes, it took us just 3 years.
@@ -23,7 +23,7 @@ Gem::Specification.new do |s|
23
23
 
24
24
  # Dependencies
25
25
  s.add_dependency "eventmachine"
26
- s.add_dependency "amq-client", "~> 0.8.2"
26
+ s.add_dependency "amq-client", "~> 0.8.3"
27
27
  s.add_dependency "amq-protocol", "~> 0.8.0"
28
28
 
29
29
  begin
@@ -85,7 +85,7 @@ h3. You can also use Bundler to install the gem
85
85
  <code>
86
86
  source :rubygems
87
87
 
88
- gem "amqp", "~> 0.8.0.RC13" # optionally: :git => "git://github.com/ruby-amqp/amqp.git", :branch => "master"
88
+ gem "amqp", "~> 0.8.0.RC15" # optionally: :git => "git://github.com/ruby-amqp/amqp.git", :branch => "master"
89
89
  </code>
90
90
  </pre>
91
91
 
@@ -100,7 +100,7 @@ irb -rubygems
100
100
  :001 > require "amqp"
101
101
  => true
102
102
  :002 > AMQP::VERSION
103
- => "0.8.0.rc13"
103
+ => "0.8.0.rc15"
104
104
  </code>
105
105
  </pre>
106
106
 
@@ -699,7 +699,7 @@ end
699
699
  <code>
700
700
  queue.bind(exchange).subscribe do |metadata, payload|
701
701
  # reject and requeue
702
- metadata.reject(true)
702
+ metadata.reject(:requeue => true)
703
703
  end
704
704
  </code>
705
705
  </pre>
@@ -6,5 +6,5 @@ module AMQP
6
6
  #
7
7
  # @see AMQ::Protocol::VERSION
8
8
  # @return [String] AMQP gem version
9
- VERSION = '0.8.0.rc15'
9
+ VERSION = '0.8.0'
10
10
  end
data/lib/mq.rb CHANGED
@@ -19,11 +19,13 @@ Why is it deprecated? Because it was a poor name choice all along. We better not
19
19
  release 1.0 with it. Both mq.rb and MQ class step away from AMQP terminology and
20
20
  make 8 out of 10 engineers think it has something to do with AMQP queues (in fact,
21
21
  MQ should have been called Channel all along). No other AMQP client library we know
22
- of invents it's own terminology when it comes to AMQP entities, and amqp gem shouldn't,
22
+ of invents its own terminology when it comes to AMQP entities, and amqp gem shouldn't,
23
23
  too.
24
24
 
25
25
  Learn more at http://bit.ly/amqp-gem-080-migration, all documentation guides are at
26
- http://bit.ly/amqp-gem-docs.
26
+ http://bit.ly/amqp-gem-docs, AMQP Model Explained at http://bit.ly/amqp-model-explained.
27
+
28
+ We are also in #rabbitmq on irc.freenode.net.
27
29
 
28
30
  Thank you for understanding. AMQP gem maintainers team.
29
31
 
@@ -47,7 +47,7 @@ describe "Multiple consumers bound to a queue with the same routing key" do
47
47
  12.times { @exchange.publish(".", :routing_key => "all.builds") }
48
48
  end
49
49
 
50
- done(2.5) {
50
+ done(4.5) {
51
51
  mailbox1.size.should == 6
52
52
  mailbox2.size.should == 6
53
53
  }
@@ -0,0 +1,39 @@
1
+ # encoding: utf-8
2
+
3
+ require 'spec_helper'
4
+
5
+ unless ENV["CI"]
6
+ describe "Message acknowledgements" do
7
+
8
+ #
9
+ # Environment
10
+ #
11
+
12
+ include EventedSpec::AMQPSpec
13
+
14
+ default_timeout 120
15
+
16
+ amqp_before do
17
+ @connection = AMQP.connect
18
+ @channel1 = AMQP::Channel.new(@connection)
19
+ @channel2 = AMQP::Channel.new(@connection)
20
+ end
21
+
22
+
23
+ it "can be issued for delivery tags >= 192" do
24
+ exchange_name = "amqpgem.tests.fanout#{rand}"
25
+ queue = @channel1.queue("", :auto_delete => true).bind(exchange_name).subscribe(:ack => true) do |metadata, payload|
26
+ puts "x-sequence = #{metadata.headers['x-sequence']}, delivery_tag = #{metadata.delivery_tag}" if ENV["DEBUG"]
27
+ metadata.ack
28
+ if metadata.delivery_tag >= 999
29
+ done(1.0)
30
+ end
31
+ end
32
+
33
+ exchange = @channel2.fanout(exchange_name, :durable => false)
34
+ 2000.times do |i|
35
+ exchange.publish("", :headers => { 'x-sequence' => i })
36
+ end
37
+ end
38
+ end
39
+ end
@@ -9,7 +9,7 @@ describe "AMQP transaction rollback" do
9
9
  #
10
10
 
11
11
  include EventedSpec::AMQPSpec
12
- default_timeout 3.5
12
+ default_timeout 4.5
13
13
 
14
14
  amqp_before do
15
15
  @producer_channel = AMQP::Channel.new
@@ -37,7 +37,7 @@ describe "AMQP transaction rollback" do
37
37
  @producer_channel.tx_rollback
38
38
  end
39
39
 
40
- done(2.5)
40
+ done(3.5)
41
41
  end # it
42
42
  end # describe
43
43
 
@@ -51,7 +51,7 @@ describe "AMQP connection closure that follows tx.select" do
51
51
  #
52
52
 
53
53
  include EventedSpec::AMQPSpec
54
- default_timeout 3.5
54
+ default_timeout 4.5
55
55
 
56
56
  amqp_before do
57
57
  @producer_channel = AMQP::Channel.new
@@ -79,7 +79,7 @@ describe "AMQP connection closure that follows tx.select" do
79
79
  @producer_channel.connection.close
80
80
  end
81
81
 
82
- done(2.5)
82
+ done(3.5)
83
83
  end # it
84
84
  end # describe
85
85
 
@@ -93,7 +93,7 @@ describe "AMQP channel closure that follows tx.select" do
93
93
  #
94
94
 
95
95
  include EventedSpec::AMQPSpec
96
- default_timeout 3.5
96
+ default_timeout 4.5
97
97
 
98
98
  amqp_before do
99
99
  @producer_channel = AMQP::Channel.new
@@ -121,7 +121,7 @@ describe "AMQP channel closure that follows tx.select" do
121
121
  @producer_channel.close
122
122
  end
123
123
 
124
- done(2.5)
124
+ done(3.5)
125
125
  end # it
126
126
  end # describe
127
127
 
@@ -134,7 +134,7 @@ describe "AMQP transaction rollback attempt on a non-transactional channel" do
134
134
  #
135
135
 
136
136
  include EventedSpec::AMQPSpec
137
- default_timeout 3.5
137
+ default_timeout 4.5
138
138
 
139
139
  amqp_before do
140
140
  @producer_channel = AMQP::Channel.new
@@ -162,6 +162,6 @@ describe "AMQP transaction rollback attempt on a non-transactional channel" do
162
162
  end
163
163
  EventMachine.add_timer(0.5) { @producer_channel.tx_rollback }
164
164
 
165
- done(2.5)
165
+ done(3.5)
166
166
  end # it
167
167
  end # describe
metadata CHANGED
@@ -1,15 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: amqp
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15424139
5
- prerelease: 6
4
+ hash: 63
5
+ prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 8
9
9
  - 0
10
- - rc
11
- - 15
12
- version: 0.8.0.rc15
10
+ version: 0.8.0
13
11
  platform: ruby
14
12
  authors:
15
13
  - Aman Gupta
@@ -19,7 +17,7 @@ autorequire:
19
17
  bindir: bin
20
18
  cert_chain: []
21
19
 
22
- date: 2011-08-28 00:00:00 +04:00
20
+ date: 2011-09-04 00:00:00 +04:00
23
21
  default_executable:
24
22
  dependencies:
25
23
  - !ruby/object:Gem::Dependency
@@ -44,12 +42,12 @@ dependencies:
44
42
  requirements:
45
43
  - - ~>
46
44
  - !ruby/object:Gem::Version
47
- hash: 59
45
+ hash: 57
48
46
  segments:
49
47
  - 0
50
48
  - 8
51
- - 2
52
- version: 0.8.2
49
+ - 3
50
+ version: 0.8.3
53
51
  type: :runtime
54
52
  version_requirements: *id002
55
53
  - !ruby/object:Gem::Dependency
@@ -305,6 +303,7 @@ files:
305
303
  - spec/integration/hello_world_spec.rb
306
304
  - spec/integration/immediate_messages_spec.rb
307
305
  - spec/integration/mandatory_messages_spec.rb
306
+ - spec/integration/message_acknowledgement_spec.rb
308
307
  - spec/integration/message_metadata_access_spec.rb
309
308
  - spec/integration/multiple_consumers_per_queue_spec.rb
310
309
  - spec/integration/ordering_of_published_messages_spec.rb
@@ -334,7 +333,8 @@ has_rdoc: true
334
333
  homepage: http://github.com/ruby-amqp/amqp
335
334
  licenses: []
336
335
 
337
- post_install_message: "[\e[32mVersion 0.8.0\e[0m] [API] AMQP::Exchange#publish calls now use a mutex on the channel exchange is declared on. Sharing channels between threads is discouraged but amqp gem covers your back in the most dangerous case.\n\
336
+ post_install_message: "[\e[32mVersion 0.8.0\e[0m] [API] AMQP::Session#on_skipped_heartbeats callback that can be used to handle skipped heartbeats (for cases when TCP network failure detection is not timely enough)\n\
337
+ [\e[32mVersion 0.8.0\e[0m] [API] AMQP::Exchange#publish calls now use a mutex on the channel exchange is declared on. Sharing channels between threads is discouraged but amqp gem covers your back in the most dangerous case.\n\
338
338
  [\e[32mVersion 0.8.0\e[0m] [API] AMQP::Channel#synchronize now can be used to guarantee mutual exclusion of multiple threads on channel instances.\n\
339
339
  [\e[32mVersion 0.8.0\e[0m] [BUG] Empty messages can finally be published fine. Yes, it took us just 3 years.\n\
340
340
  [\e[32mVersion 0.8.0\e[0m] [FEATURE] When connected to RabbitMQ, RabbitMQ-specific extensions are required automatically\n\
@@ -395,14 +395,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
395
395
  required_rubygems_version: !ruby/object:Gem::Requirement
396
396
  none: false
397
397
  requirements:
398
- - - ">"
398
+ - - ">="
399
399
  - !ruby/object:Gem::Version
400
- hash: 25
400
+ hash: 3
401
401
  segments:
402
- - 1
403
- - 3
404
- - 1
405
- version: 1.3.1
402
+ - 0
403
+ version: "0"
406
404
  requirements: []
407
405
 
408
406
  rubyforge_project: amqp