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 collaboratorSubscribing a Consumer with a block
- Background
-
- Given
- I am connected to the broker
- And
- I have a destination :dest_queue with no messages on it
- And
- I have a destination :source_queue with no messages on it
- And
-
I create a subscription
MessageDriver::Client.subscribe_with(:source_queue) do |message| MessageDriver::Client.publish(:dest_queue, message.body) end
- Scenarios
-
- Consuming Messages
-
- When
-
I send the following messages to :source_queue
body Test Message 1 Test Message 2 - And
- I let the subscription process
- Then
- I expect to find no messages on :source_queue
- And
-
I expect to find the following 2 messages on :dest_queue
body Test Message 1 Test Message 2
- Ending a subscription
-
- When
-
I send the following messages to :source_queue
body Test Message 1 Test Message 2 - And
- I allow for processing
- And
- I cancel the subscription
- And
-
I send the following messages to :source_queue
body Test Message 3 Test Message 4 - Then
-
I expect to find the following 2 messages on :dest_queue
body Test Message 1 Test Message 2 - And
-
I expect to find the following 2 messages on :source_queue
body Test Message 3 Test Message 4
Last published over 7 years ago by soupmatt.