3 Replies Latest reply on Jul 11, 2012 9:18 AM by Noa Drach

    How To Figure Out why the code that sends to a queue is slow

    Noa Drach Novice

      Hello All,

       

      I need some pointers on where to check why my code that handles sending to a queue is slow.

       

      this is the scenario I have:

       

      • there are about 60,000 messages that are sent
      • each message goes through several components and queue
      • but I am not sending the whole 60,00 in one bit - I divide them into chunks of 100 each time
        • potentially 100 messages can be sent every 10 seconds to the first queue, but the sending of a new chunk isn't initiated if the previous chunk wasn't fully delivered to the queue
      • The logic of the sending is as follows
        • get 100 Id's to be sent
        • loop over the id's
          • get the entity correlated to the id from the DB - average time 10 milliseconds
          • send a message to the queue that contains only the ID - average time 900 milliseconds
            • session.createObjectMessage() - average time 300 milliseconds
            • producer.send(objectMsg) - average time 600 milliseconds

       

      the session and producer instances are created and closed for each chunk of 100 messages

       

      so - do you have any idea what should I check? queues configuration? paging? ...?

       

      Thanks,

      Noa