Logo: Relish

  1. Sign in

Project: Message-driver 0.1.0

Destination Metadata

  • @bunny
  • @in_memory
Background
Given
the following broker configuration:
MessageDriver::Broker.define do |b|
  b.destination :my_queue, "my_queue", exclusive: true
end
Scenarios
Checking the message count when the queue is empty
When
I execute the following code:
destination = MessageDriver::Broker.find_destination(:my_queue)
expect(destination.message_count).to eq(0)
Then
I expect to have no errors
And
I expect to find no messages on :my_queue
  • @no_travis
Checking the message count when the queue has messages
When
I execute the following code:
publish(:my_queue, "test message 1")
publish(:my_queue, "test message 2")
destination = MessageDriver::Broker.find_destination(:my_queue)
expect(destination.message_count).to eq(2)
Then
I expect to have no errors
And
I expect to find 2 messages on :my_queue

Last published almost 5 years ago by soupmatt.