Subject: | Messages in queue are out of order. |
I have a simple script that produces 10 messages. When I consume them,
the messages are out of order. If I uncomment the sleep 1, then it
works correctly. Shouldn't order be guaranteed since this is a queue?
What am I not understanding?
I have started mq.pl with no arguments.
Here is the relevant section of my producer code:
my $stomp = Net::Stomp->new({
hostname => 'localhost',
port => 61613
});
$stomp->connect();
for (1 .. $numMessages)
{
print "$_ adding $qpath: $message\n";
$stomp->send({
destination => "$qpath",
body => "$message$_",
persistent => 'true',
});
#sleep 1;
}