You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by nmittal <nm...@rblt.com> on 2010/02/18 14:36:17 UTC

Perl Net::Stomp keeps complaining "Error reading command.."

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.