2 Replies Latest reply on Jul 23, 2010 8:45 AM by bershath27

    slow JMS performance

    rsmadhavan

      Hi, I have a single source which produces 1000 messages per sec. I need to insert in the database as fast I can. So i added those message in a JMS queue and tried to receive it using MDB and store in hte database. But i could able to see that only 5 messages are read by hte JMS receiver every sec. Could any1 explain who is this hap?

       

      Thanks!!

        • 1. Re: slow JMS performance
          b.eckenfels

          There are multiple aspects to your question. First of all: if you use JDBC Persistence for your MQ you will get a lot of inserts/updates/delets for every message sent. This means JMS is in this scenario never faster than inserting directly into the database. If you use different persistence the speed depends on the implementation (JbossMQ is rather slow with filesystem, HornetQ is pretty fast). If you use a Null Persitence provider (or use temporary messages on a topic which is essentially in memory) its faster but lesss durable.

           

          On the other side (consuming the messages) the throughput depends not only on the persitence provider, but also on the thread settings of the MDB and especially on the insert performance. If you DB cant handle more than 5 inserts/sec the MDB will not process more messages.

           

          You should describe:

          - your hardware landscape

          - your software landscape (JBoss Version, MQ version, ...)

          - the raw mdb speed (with an empty onMessage() method

          - do you use xa?

           

          otherwise we cant really give you answers.

           

          Gruss

          Bernd

          • 2. Re: slow JMS performance
            bershath27

            A couple of things can be done to improve the performance at the message consumer, in this case on the MDB.

            - Increase the number of JMS sessions in the JMS Server Session pool

            - Increase the number of MDB instances

            - Tune the database and increase the connection pool accordingly in your datasource configuration

            You'd find ample amount of resources to get this done, hence not explained the steps.

             

            Plan B:

            Move on to JBossMessaging or HornetQ ;-)