4 Replies Latest reply on Dec 9, 2011 12:01 AM by gaohoward

    Using hornetQ with stomp - empty message received on client

    shergill

      Hi guys

       

      I am using a ClientProducer to send a message on a queue. The message contains the current timestamp as its body

       

      ClientMessage message = _session.createMessage(true);

       

      // for now; we send current datetime as body of msg
      DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
      Date date = new Date();
      String msg =  dateFormat.format(date);
      message.getBodyBuffer().writeString(msg);
      message.setDurable(false);

       

       

      On my linux stomp client; I do receive the message; but it shows up as 'empty body'.. Here is relevant linux code

       

          my $frame = $stomp->receive_frame;
          print "Got msg :  " . $frame->body . "\n";
          $stomp->ack( { 'frame' => $frame } );

       

       

      I am using thi spackage on linux: http://search.cpan.org/~jtang/Net-Stomp-0.44/lib/Net/Stomp.pm

       

       

      Any tips would be great.. Thanks!