You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by titexe <ti...@yahoo.Fr> on 2010/08/02 11:00:38 UTC
ActiveMQ Stomp : know number of messages in queue
Hello,
i want in my script perl with stomp, to get all messages that exist in my
queue.
with this code, i get only the first message :
my $can_read = $stomp->can_read({ timeout => "0.1" });
if ( $can_read ) {
my $frame = $stomp->receive_frame;
my $framebody=$frame->body;
$stomp->ack( { frame => $frame } );
How to get All Messages,
thanks in advance.
--
View this message in context: http://old.nabble.com/ActiveMQ-Stomp-%3A-know-number-of-messages-in-queue-tp29323208p29323208.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: ActiveMQ Stomp : know number of messages in queue
Posted by Roger Hoover <ro...@gmail.com>.
Put the whole thing in a while loop?
while ($stomp->can_read({ timeout => "0.1" })
{
my $frame = $stomp->receive_frame;
my $framebody=$frame->body;
$stomp->ack( { frame => $frame } );
}
On Mon, Aug 2, 2010 at 2:00 AM, titexe <ti...@yahoo.fr> wrote:
>
> Hello,
>
> i want in my script perl with stomp, to get all messages that exist in my
> queue.
>
> with this code, i get only the first message :
>
> my $can_read = $stomp->can_read({ timeout => "0.1" });
> if ( $can_read ) {
> my $frame = $stomp->receive_frame;
> my $framebody=$frame->body;
> $stomp->ack( { frame => $frame } );
>
> How to get All Messages,
>
> thanks in advance.
> --
> View this message in context:
> http://old.nabble.com/ActiveMQ-Stomp-%3A-know-number-of-messages-in-queue-tp29323208p29323208.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>