Subject: | stomp server fails when consumer brakes during receiving a message |
Date: | Thu, 7 May 2009 21:41:26 +0100 |
To: | <bug-POE-Component-MessageQueue [...] rt.cpan.org> |
From: | "Cezary Siwek" <czarek [...] thebestisp.co.uk> |
our $VERSION = '0.2.6';
perl v5.10.0
I've discovered during my tests that server crashes when the consumer brakes
during receiving a message (basically, when doesn't ack the message).
This happens when the BigMemory storage type is in use.
I'm using this simple consumer:
$stomp->subscribe({
destination => '/queue/services.provision',
ack => 'client'
});
while (1)
{
my $frame = $stomp->receive_frame;
log_debug "Received: ".$frame->body . "\n";
process_frame($frame->headers,$frame->body);
$stomp->ack({ frame => $frame });
}
the 'process_frame' subroutine fails because mysql query fails in other part
of my code, consumer crashes so the message is not being acked.
the server prints:
Thu May 7 20:19:59 2009 RECV (11): CONNECT nothing:manager
Use of uninitialized value in string eq at
/usr/local/share/perl/5.10.0/POE/Component/MessageQueue/Message.pm line 111.
Thu May 7 20:19:59 2009 RECV (11): SEND message
7023CAD8-3B44-11DE-AF56-E220F2EF0066 (148 bytes) to
/queue/services.provision (persistent: 0)
Thu May 7 20:19:59 2009 QUEUE: Message 7023CAD8-3B44-11DE-AF56-E220F2EF0066
claimed by 9 during send
Thu May 7 20:19:59 2009 STORE: COMPLEX: FRONT: Added
7023CAD8-3B44-11DE-AF56-E220F2EF0066.
Thu May 7 20:19:59 2009 Dispatching message
7023CAD8-3B44-11DE-AF56-E220F2EF0066 to client 9
Thu May 7 20:19:59 2009 RECV (11): DISCONNECT
Thu May 7 20:19:59 2009 MASTER: Removing client 11
Thu May 7 20:19:59 2009 MASTER: Removing client 9
Can't call method "add" on an undefined value at
/usr/local/share/perl/5.10.0/POE/Component/MessageQueue/Storage/BigMemory.pm
line 296.
Cezary