3 Replies Latest reply on Mar 15, 2010 4:15 PM by Tim Fox

    Large message lost packets

    Scott Zhang Newbie

      Hi guys,

       

      I send a long string through BytesMessage, but received wrong message.

       

      Sender program:

      {code:java}

      // here s is a large string and s.length() = 1040824

      BytesMessage message = session.createBytesMessage(); ByteArrayInputStream bis = new ByteArrayInputStream(s.getBytes("UTF-8")); BufferedInputStream is = new BufferedInputStream(bis); message.setObjectProperty("JMS_HQ_InputStream", is); producer.send(message);

      {code}
      Receiver program:
      {code:java}
      ByteArrayOutputStream bos = new ByteArrayOutputStream(); BufferedOutputStream os = new BufferedOutputStream(bos); ((BytesMessage) message).setObjectProperty("JMS_HQ_SaveStream", os); String s = new String(bos.toByteArray(), "UTF-8");
      // here received s.length() = 1036062
      {code}
      The min-large-message-size is configured 1048576 in hornetq-jms.xml.
      When I change min-large-message-size to 2000000, it's ok.
      Is it a bug?