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 collaboratorPublishing a Message within a Transaction
- Background
-
- Given
-
the following broker configuration:
MessageDriver::Broker.define do |b| b.destination :my_queue, "my_queue", exclusive: true end
- Scenarios
-
- The block completes successfully
-
- When
-
I execute the following code:
with_message_transaction do publish(:my_queue, "Transacted Message 1") publish(:my_queue, "Transacted Message 2") end
- Then
-
I expect to find 2 messages on :my_queue with:
body Transacted Message 1 Transacted Message 2
- An error is raised inside the block
-
- When
-
I execute the following code:
with_message_transaction do publish(:my_queue, "Transacted Message 1") raise "an error that causes a rollback" publish(:my_queue, "Transacted Message 2") end
- Then
- I expect it to raise "an error that causes a rollback"
- And
- I expect to find no messages on :my_queue
Last published over 7 years ago by soupmatt.