activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nmittal <nmit...@rblt.com>
Subject Perl Net::Stomp keeps complaining "Error reading command.."
Date Thu, 18 Feb 2010 13:36:17 GMT

Hi,
I have a perl Net::Stomp client that subscribes to a queue (only consumer).
it runs for a while before giving..
Error reading command:  at
/usr/local/lib/perl5/site_perl/5.10.0/Net/Stomp/Frame.pm line 37, <GEN0>
line 4.

it fails even if the messages are always the same.

#!/usr/bin/perl -w

use strict;
use Net::Stomp;
use POSIX qw(strftime);
use FileHandle;
use Data::Dumper;

my $broker = defined($ARGV[0])? $ARGV[0] : "localhost";
my $stomp = Net::Stomp->new( { hostname => $broker, port => '61613' } );
$stomp->connect();
$stomp->subscribe(
      {   destination             => '/queue/Admin.Logs.Q',
          'ack'                   => 'client',
          'activemq.prefetchSize' => 1,
          'transformation' => 'jms-map-json'
      }
  );

my $last_date = "";
my $fh = new FileHandle;
$fh->open(">>logs/log");

while (1) {
    my $frame = $stomp->receive_frame;
.
.
.
}


any insight is appreciated.

thanks
Nishant
-- 
View this message in context: http://old.nabble.com/Perl-Net%3A%3AStomp-keeps-complaining-%22Error-reading-command..%22-tp27637677p27637677.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message