4 Replies Latest reply: Jul 2, 2010 11:27 AM by 807581 RSS

    Prefetch on OpenMQ

    807581
      Hi,

      I have been testing some JMS implementations and one thing I could not find on OpenMQ is the possibility to configure the amount of messages each consumers will prefetch.
      Since my consumers has a long processing time I would like to use 1 as prefetch size and then increase the number of consumers.
      I was able to do that using ActiveMQ: http://activemq.apache.org/what-is-the-prefetch-limit-for.html

      Is it possible to do the same using Glassfish?
      Does anyone knows the right configuration parameter for that?


      Thanks
        • 1. Re: Prefetch on OpenMQ
          805009
          Yes, in Glassfish Message Queue the equivalent properties are imqConsumerFlowLimit (configured on the consuming connection) and consumerFlowLimit (configured in the destination itself). You may also want to change imqConsumerFlowThreshold.

          These and other flow control properties are described here
          [http://docs.sun.com/app/docs/doc/821-0027/aeohh?a=view|http://docs.sun.com/app/docs/doc/821-0027/aeohh?a=view]
          and here
          [http://docs.sun.com/app/docs/doc/821-0027/aeoky?a=view|http://docs.sun.com/app/docs/doc/821-0027/aeoky?a=view]
          • 2. Re: Prefetch on OpenMQ
            807581
            Great! That's exactly what I was looking for!

            Thank you very much Nigel!
            • 3. Re: Prefetch on OpenMQ
              807581
              Just a word of caution, if you are trying to get guaranteed order round-robin delivery; consumerFlowLimit=1 will still queue up one message in the consumer buffer; so you aren't able to get the right order out of openMQ with multiple consumers currently...
              • 4. Re: Prefetch on OpenMQ
                807581
                consumerFlowLimit=1 will still queue up one message in the consumer buffer
                This is issue 6727929 that has been fixed in 4.5