1 Reply Latest reply on May 13, 2002 7:16 PM by hchirino

    BytesMessage and StreamMessage

    tradem

      Hi Folks,

      I'm trying to send BytesMessages or StreamMessage to JBossMQ in RC3 build of JBoss.

      Sending JMS messages works fine. Reading does not.
      Consider I'm writing a a string as bytes into an BytesMessage or a StreamMessage. I'm using a MessageListener to receive the message from a javax.jms.Queue. I found some points that are somewhat weird for me, so perhaps you can help me.

      1) Writing an array of bytes into a BytesMessage and reading it in listener byte for byte using readByte() Method gives me a null byte ( 0 as int) for each period dividable by two ( ex. I post Hello as byte array and recevie H (as byte), then 0 as byte and then e as byte and so on). Is that behavoir correct? If yes, why?

      2) Bytes-, Stream and TextMessage may have problems with escape sequences ( \n, \r, \t). Bytes- and StreamMessage readXXX() methods does not return them whereas TextMessages returning odd bit of text ( in my test the section of a string after a \r is moved to the begining of the string but it was at the end at time of sending.)
      I'm also trying to turn persitence on and of with effect. Does these Message behaves correctely or is it a bug? Whenever I send something to the MQ I get a stacktrace in JBoss log (console and file). It's a SocketExcpetion (JVM receiv reset by peer or something like that). Any advice?

      3) Who does autoacknowlege behaves. I guess it should delete a message from queue automatically, doesn't it?

      Thank you at all :)

      Byte
      Toby