0 Replies Latest reply on Jan 3, 2002 3:23 PM by Arjav Parikh

    message size and performance

    Arjav Parikh Newbie

      I am sure that I am doing something wrong, but it doesn't seem very obvious to me:-)

      I am using JBoss 2.4.3 with JBossMQ component. I am sending asynch object messages. In order to check performance of various sizes of the messages, I created following test message

      public class TTTestMessage {

      private String message;
      public TTTestMessage(int size) {
      StringBuffer sb = new StringBuffer(size);
      for (int i=0;i<size;i++)
      sb.append('1');
      message = sb.toString()+new java.util.Date();
      }

      public String toString(){
      return message;
      }
      }

      I use
      ObjectMessage message = queueSession.createObjectMessage();
      TTTestMessage myObjectMsg = new TTTestMessage(1024);
      message.setObject(myObjectMsg);

      If I use size of 1024 to create a test message it takes longer than that of a message that is created with 2048 or larger size.

      Is this the correct way to check performance for different message sizes? Is there any configuration parameter that I should look at?

      I worked out an exact cut off number that I pass it to the constructor which is size<=1313 is slower(magnitude of 50 or more) while size>1313 works fast.

      Any help is greatly appreciated.

      Thanks a bunch.

      Best Regards,
      arjav