To add a collaborator to this project you will need to use the Relish gem to add the collaborator via a terminal command. Soon you'll be able to also add collaborators here!
More about adding a collaboratorBinding AMQP destinations to exchanges
- Background
-
- Given
-
the following broker configuration
MessageDriver::Broker.define do |b| b.destination :direct_exchange, "amq.direct", type: :exchange end
- Scenarios
-
- Binding a queue to an exchange
-
- When
-
I execute the following code
MessageDriver::Broker.define do |b| b.destination :my_queue, "my_bound_queue", exclusive: true, bindings: [ {source: "amq.direct", args: {routing_key: "test_binding"}}, {source: "amq.direct", args: {routing_key: "spec_binding"}} ] end publish(:direct_exchange, "Test Message", {}, {routing_key: "test_binding"}) publish(:direct_exchange, "Spec Message", {}, {routing_key: "spec_binding"})
- Then
-
I expect to find the following 2 messages on :my_queue
body Test Message Spec Message
- Binding an exchange to an exchange
-
RabbitMQ's AMQP 0.9 extenstions support binding exchanges to exchanges
- When
-
I execute the following code
MessageDriver::Broker.define do |b| b.destination :fanout, "amq.fanout", type: :exchange, bindings: [ {source: "amq.direct", args: {routing_key: "test_binding"}}, {source: "amq.direct", args: {routing_key: "spec_binding"}} ] b.destination :my_queue, "my_bound_queue", exclusive: true, bindings: [{source: "amq.fanout"}] end publish(:direct_exchange, "Test Message", {}, {routing_key: "test_binding"}) publish(:direct_exchange, "Spec Message", {}, {routing_key: "spec_binding"})
- Then
-
I expect to find the following 2 messages on :my_queue
body Test Message Spec Message
Last published over 7 years ago by soupmatt.