amqp 0.8.0.rc14 → 0.8.0.rc15

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. data/.travis.yml +3 -3
  2. data/Gemfile +9 -6
  3. data/README.md +18 -12
  4. data/amqp.gemspec +2 -2
  5. data/bin/docup +3 -0
  6. data/docs/08Migration.textile +67 -5
  7. data/docs/AMQP091ModelExplained.textile +138 -101
  8. data/docs/Bindings.textile +109 -8
  9. data/docs/ConnectingToTheBroker.textile +8 -0
  10. data/docs/ConnectionEncryptionWithTLS.textile +5 -0
  11. data/docs/DocumentationGuidesIndex.textile +21 -5
  12. data/docs/Durability.textile +3 -1
  13. data/docs/ErrorHandling.textile +20 -0
  14. data/docs/Exchanges.textile +7 -1
  15. data/docs/GettingStarted.textile +10 -0
  16. data/docs/PatternsAndUseCases.textile +6 -0
  17. data/docs/Queues.textile +7 -1
  18. data/docs/RabbitMQVersions.textile +6 -1
  19. data/docs/RunningTests.textile +8 -3
  20. data/docs/Troubleshooting.textile +31 -0
  21. data/docs/VendorSpecificExtensions.textile +137 -6
  22. data/examples/extensions/rabbitmq/per_queue_message_ttl.rb +24 -25
  23. data/examples/extensions/rabbitmq/publisher_confirmations_with_transient_messages.rb +11 -20
  24. data/examples/extensions/rabbitmq/using_alternate_exchanges.rb +28 -0
  25. data/examples/hello_world.rb +1 -1
  26. data/lib/amqp.rb +1 -0
  27. data/lib/amqp/compatibility/ruby187_patchlevel_check.rb +2 -0
  28. data/lib/amqp/integration/rails.rb +17 -0
  29. data/lib/amqp/version.rb +1 -1
  30. data/spec/integration/authentication_spec.rb +2 -2
  31. data/spec/integration/fanout_exchange_routing_spec.rb +43 -199
  32. data/spec/integration/multiple_consumers_per_queue_spec.rb +7 -7
  33. data/spec/integration/regressions/concurrent_publishing_on_the_same_channel_spec.rb +1 -1
  34. data/spec/integration/stress/publishing_of_messages_with_incrementing_sizes_spec.rb +50 -0
  35. metadata +13 -9
@@ -12,7 +12,7 @@ describe "Multiple non-exclusive consumers per queue" do
12
12
  include EventedSpec::SpecHelper
13
13
 
14
14
  default_options AMQP_OPTS
15
- default_timeout 5
15
+ default_timeout 10
16
16
 
17
17
  let(:messages) { (0..99).map {|i| "Message #{i}" } }
18
18
 
@@ -62,7 +62,7 @@ describe "Multiple non-exclusive consumers per queue" do
62
62
  end
63
63
  end
64
64
 
65
- done(4.5) {
65
+ done(6.5) {
66
66
  @consumer1_mailbox.size.should == 34
67
67
  @consumer2_mailbox.size.should == 33
68
68
  @consumer3_mailbox.size.should == 33
@@ -108,7 +108,7 @@ describe "Multiple non-exclusive consumers per queue" do
108
108
  end
109
109
  end
110
110
 
111
- done(2.5) {
111
+ done(5.0) {
112
112
  @consumer1_mailbox.size.should == 34
113
113
  @consumer2_mailbox.size.should == 33
114
114
  @consumer3_mailbox.size.should == 33
@@ -154,7 +154,7 @@ describe "Multiple non-exclusive consumers per queue" do
154
154
  end
155
155
  end
156
156
 
157
- done(4.5) {
157
+ done(5.0) {
158
158
  @consumer1_mailbox.size.should == 50
159
159
  @consumer2_mailbox.size.should == 0
160
160
  @consumer3_mailbox.size.should == 50
@@ -203,7 +203,7 @@ describe "Multiple non-exclusive consumers per queue" do
203
203
  end
204
204
  end
205
205
 
206
- done(4.5) {
206
+ done(5.0) {
207
207
  @consumer1_mailbox.size.should == 100
208
208
  @consumer2_mailbox.size.should == 0
209
209
  @consumer3_mailbox.size.should == 0
@@ -249,7 +249,7 @@ describe "Multiple non-exclusive consumers per queue" do
249
249
  end
250
250
  end
251
251
 
252
- done(4.5) {
252
+ done(5.0) {
253
253
  @consumer1_mailbox.size.should == 100
254
254
  @consumer2_mailbox.size.should == 0
255
255
  @consumer3_mailbox.size.should == 0
@@ -311,7 +311,7 @@ describe "Multiple non-exclusive consumers per queue" do
311
311
  end
312
312
  end
313
313
 
314
- done(4.5) {
314
+ done(6.0) {
315
315
  @returned_messages.size.should == 100
316
316
  }
317
317
  end # it
@@ -87,5 +87,5 @@ if mri?
87
87
  # no UNEXPECTED_FRAME connection-level exceptions. MK.
88
88
  }
89
89
  end
90
- end
90
+ end
91
91
  end
@@ -0,0 +1,50 @@
1
+ # encoding: utf-8
2
+
3
+ require "spec_helper"
4
+
5
+ # this example group ensures no message size is special
6
+ # (with respect to framing edge cases). MK.
7
+ describe "Stress test with messages with incrementing sizes" do
8
+
9
+ #
10
+ # Environment
11
+ #
12
+
13
+ include EventedSpec::AMQPSpec
14
+ default_options AMQP_OPTS
15
+ default_timeout 60
16
+
17
+ amqp_before do
18
+ @channel = AMQP::Channel.new
19
+ @channel.on_error do |ch, close|
20
+ raise "Channel-level error!: #{close.inspect}"
21
+ end
22
+
23
+ @queue = @channel.queue("", :auto_delete => true)
24
+ @exchange = @channel.fanout("amqpgem.tests.integration.fanout.exchange", :auto_delete => true)
25
+
26
+ @queue.bind(@exchange)
27
+ end
28
+
29
+
30
+ #
31
+ # Examples
32
+ #
33
+
34
+ it "passes" do
35
+ list = Range.new(0, 4785).to_a
36
+ received = Array.new
37
+
38
+ @queue.subscribe do |metadata, payload|
39
+ received << payload.bytesize
40
+
41
+ done if received == list
42
+ end
43
+
44
+ EventMachine.add_timer(1.0) do
45
+ list.each do |n|
46
+ @exchange.publish("i" * n)
47
+ end
48
+ end
49
+ end
50
+ end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: amqp
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15424137
4
+ hash: 15424139
5
5
  prerelease: 6
6
6
  segments:
7
7
  - 0
8
8
  - 8
9
9
  - 0
10
10
  - rc
11
- - 14
12
- version: 0.8.0.rc14
11
+ - 15
12
+ version: 0.8.0.rc15
13
13
  platform: ruby
14
14
  authors:
15
15
  - Aman Gupta
@@ -19,7 +19,7 @@ autorequire:
19
19
  bindir: bin
20
20
  cert_chain: []
21
21
 
22
- date: 2011-07-25 00:00:00 +04:00
22
+ date: 2011-08-28 00:00:00 +04:00
23
23
  default_executable:
24
24
  dependencies:
25
25
  - !ruby/object:Gem::Dependency
@@ -42,14 +42,14 @@ dependencies:
42
42
  requirement: &id002 !ruby/object:Gem::Requirement
43
43
  none: false
44
44
  requirements:
45
- - - ">="
45
+ - - ~>
46
46
  - !ruby/object:Gem::Version
47
- hash: 63
47
+ hash: 59
48
48
  segments:
49
49
  - 0
50
50
  - 8
51
- - 0
52
- version: 0.8.0
51
+ - 2
52
+ version: 0.8.2
53
53
  type: :runtime
54
54
  version_requirements: *id002
55
55
  - !ruby/object:Gem::Dependency
@@ -58,7 +58,7 @@ dependencies:
58
58
  requirement: &id003 !ruby/object:Gem::Requirement
59
59
  none: false
60
60
  requirements:
61
- - - ">="
61
+ - - ~>
62
62
  - !ruby/object:Gem::Version
63
63
  hash: 63
64
64
  segments:
@@ -108,6 +108,7 @@ files:
108
108
  - amqp.gemspec
109
109
  - bin/ci/before_build.sh
110
110
  - bin/cleanify.rb
111
+ - bin/docup
111
112
  - bin/irb
112
113
  - bin/set_test_suite_realms_up.sh
113
114
  - docs/08Migration.textile
@@ -167,6 +168,7 @@ files:
167
168
  - examples/exchanges/declare_an_exchange_without_assignment.rb
168
169
  - examples/extensions/rabbitmq/per_queue_message_ttl.rb
169
170
  - examples/extensions/rabbitmq/publisher_confirmations_with_transient_messages.rb
171
+ - examples/extensions/rabbitmq/using_alternate_exchanges.rb
170
172
  - examples/guides/getting_started/01_hello_world.rb
171
173
  - examples/guides/getting_started/02_hello_world_dslified.rb
172
174
  - examples/guides/getting_started/03_blabbr.rb
@@ -273,6 +275,7 @@ files:
273
275
  - lib/amqp/extensions/rabbitmq.rb
274
276
  - lib/amqp/header.rb
275
277
  - lib/amqp/int_allocator.rb
278
+ - lib/amqp/integration/rails.rb
276
279
  - lib/amqp/logger.rb
277
280
  - lib/amqp/queue.rb
278
281
  - lib/amqp/rpc.rb
@@ -317,6 +320,7 @@ files:
317
320
  - spec/integration/regressions/issue66_spec.rb
318
321
  - spec/integration/reply_queue_communication_spec.rb
319
322
  - spec/integration/store_and_forward_spec.rb
323
+ - spec/integration/stress/publishing_of_messages_with_incrementing_sizes_spec.rb
320
324
  - spec/integration/topic_subscription_spec.rb
321
325
  - spec/integration/tx_commit_spec.rb
322
326
  - spec/integration/tx_rollback_spec.rb