amqp 1.0.0.pre2 → 1.0.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.
- data/.travis.yml +3 -0
- data/README.md +80 -72
- data/amqp.gemspec +5 -13
- data/docs/08Migration.textile +4 -0
- data/docs/AMQP091ModelExplained.textile +6 -1
- data/docs/Bindings.textile +4 -0
- data/docs/Clustering.textile +4 -0
- data/docs/ConnectingToTheBroker.textile +4 -0
- data/docs/ConnectionEncryptionWithTLS.textile +4 -0
- data/docs/DocumentationGuidesIndex.textile +4 -0
- data/docs/Durability.textile +4 -0
- data/docs/ErrorHandling.textile +4 -0
- data/docs/Exchanges.textile +4 -0
- data/docs/GettingStarted.textile +4 -0
- data/docs/PatternsAndUseCases.textile +4 -1
- data/docs/Queues.textile +4 -0
- data/docs/RabbitMQVersions.textile +4 -0
- data/docs/RunningTests.textile +4 -0
- data/docs/TestingWithEventedSpec.textile +4 -0
- data/docs/Troubleshooting.textile +4 -0
- data/docs/VendorSpecificExtensions.textile +4 -0
- data/examples/error_handling/automatic_recovery_of_channel_and_queues.rb +1 -1
- data/examples/error_handling/automatically_recovering_hello_world_consumer.rb +1 -1
- data/examples/error_handling/automatically_recovering_hello_world_consumer_that_uses_a_server_named_queue.rb +1 -1
- data/examples/error_handling/connection_level_exception.rb +1 -1
- data/examples/error_handling/connection_level_exception_with_objects.rb +1 -1
- data/examples/error_handling/connection_loss_handler.rb +4 -3
- data/examples/error_handling/hello_world_producer.rb +1 -1
- data/examples/error_handling/manual_connection_and_channel_recovery.rb +1 -1
- data/examples/extensions/rabbitmq/publisher_confirmations_with_transient_messages.rb +1 -1
- data/examples/extensions/rabbitmq/using_alternate_exchanges.rb +1 -1
- data/examples/guides/getting_started/01_hello_world.rb +1 -1
- data/examples/guides/getting_started/02_hello_world_dslified.rb +1 -1
- data/examples/hello_world.rb +1 -1
- data/examples/hello_world_with_an_empty_string.rb +1 -1
- data/examples/hello_world_with_eventmachine_in_a_separate_thread.rb +2 -2
- data/examples/hello_world_with_large_payload.rb +41 -41
- data/examples/patterns/request_reply/client.rb +1 -2
- data/examples/patterns/request_reply/server.rb +0 -1
- data/examples/publishing/returned_messages.rb +1 -1
- data/examples/queues/accessing_message_metadata.rb +1 -1
- data/examples/queues/cancel_default_consumer.rb +1 -1
- data/lib/amqp/channel.rb +34 -16
- data/lib/amqp/client.rb +2 -2
- data/lib/amqp/connection.rb +2 -1
- data/lib/amqp/consumer.rb +2 -2
- data/lib/amqp/exceptions.rb +11 -2
- data/lib/amqp/exchange.rb +5 -5
- data/lib/amqp/queue.rb +51 -26
- data/lib/amqp/session.rb +5 -5
- data/lib/amqp/version.rb +1 -1
- data/spec/integration/basic_get_spec.rb +82 -27
- data/spec/integration/basic_return_spec.rb +3 -3
- data/spec/integration/channel_level_exception_with_multiple_channels_spec.rb +0 -1
- data/spec/integration/exchange_declaration_spec.rb +71 -102
- data/spec/integration/extensions/rabbitmq/publisher_confirmations_spec.rb +1 -1
- data/spec/integration/fanout_exchange_routing_spec.rb +1 -1
- data/spec/integration/multiple_consumers_per_queue_spec.rb +3 -160
- data/spec/integration/queue_redeclaration_with_incompatible_attributes_spec.rb +25 -12
- data/spec/integration/regressions/concurrent_publishing_on_the_same_channel_spec.rb +1 -1
- data/spec/integration/remove_individual_binding_spec.rb +51 -0
- data/spec/integration/reply_queue_communication_spec.rb +1 -2
- data/spec/integration/store_and_forward_spec.rb +6 -9
- data/spec/integration/topic_subscription_spec.rb +5 -4
- data/spec/spec_helper.rb +8 -2
- data/spec/unit/amqp/connection_spec.rb +3 -1
- metadata +93 -109
- data/spec/integration/immediate_messages_spec.rb +0 -59
@@ -1,59 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
require 'spec_helper'
|
3
|
-
|
4
|
-
|
5
|
-
describe "When queue has no consumers" do
|
6
|
-
|
7
|
-
#
|
8
|
-
# Environment
|
9
|
-
#
|
10
|
-
|
11
|
-
include EventedSpec::AMQPSpec
|
12
|
-
default_timeout 1.5
|
13
|
-
|
14
|
-
amqp_before do
|
15
|
-
@producer_channel = AMQP::Channel.new
|
16
|
-
@consumer_channel = AMQP::Channel.new
|
17
|
-
end
|
18
|
-
|
19
|
-
# ...
|
20
|
-
|
21
|
-
|
22
|
-
#
|
23
|
-
# Examples
|
24
|
-
#
|
25
|
-
|
26
|
-
context "and message is published as :immediate" do
|
27
|
-
it "that message is returned to the publisher" do
|
28
|
-
exchange = @producer_channel.fanout("amq.fanout")
|
29
|
-
queue = @consumer_channel.queue("", :exclusive => true)
|
30
|
-
|
31
|
-
exchange.on_return do |basic_return, metadata, payload|
|
32
|
-
done if payload == "immediate message body"
|
33
|
-
end
|
34
|
-
|
35
|
-
queue.bind(exchange) do
|
36
|
-
exchange.publish "immediate message body", :immediate => true
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
context "and message is published as non :immediate" do
|
44
|
-
it "that message is dropped" do
|
45
|
-
exchange = @producer_channel.fanout("amq.fanout")
|
46
|
-
queue = @consumer_channel.queue("", :exclusive => true)
|
47
|
-
|
48
|
-
exchange.on_return do |basic_return, metadata, payload|
|
49
|
-
fail "Should not happen"
|
50
|
-
end
|
51
|
-
|
52
|
-
queue.bind(exchange) do
|
53
|
-
exchange.publish "non-immediate message body", :immediate => false
|
54
|
-
end
|
55
|
-
|
56
|
-
done(1.0)
|
57
|
-
end
|
58
|
-
end
|
59
|
-
end # describe
|