3 Replies Latest reply: May 27, 2010 1:38 PM by 807581 RSS

    Low Memory Queue in OpenMQ

    807581
      Hi There,

      I recently installed openMQ 4.3 in our linux machine. We are using spring jms in order to consume and produce the messages. The messages are simple non persistent text messages(As we are creating text messages and setting the setJMSDeliveryMode to DeliveryMode.NON_PERSISTENT). We have two queues on one broker without any clustering. We have one producer which puts 2 messages onto the queue per second. And there are 2 concurrent consumers listening on that queue. We are using flow_control mechanism And the setup was running perfectly fine without any problem till yesterday.

      The process got stopped due to the memory limit on the queue. When I did metrics on that particular queue.
      I observed the number of messages as around 700K and the difference between IN and OUT as around 1000.

      I am very confused by looking the memory usage by the queue even after almost all of the messages are consumed.

      Does the openMQ queue holds the consumed message as well in the queue memory?
      How could I configure openMQ such that only non consumed messages hold the memory?
      How can I increase the memory of the queue?

      Regards,
      Krishna Kumar
        • 1. Re: Low Memory Queue in OpenMQ
          807581
          Does the openMQ queue holds the consumed message as well in the queue memory?
          No, when a message is consumed, that is acknowledged for non-transacted consumer or committed for transacted consumer, it's removed from the system. Please check the #UnAck message count. For example, if a consumer client with CLIENT_ACKNOWLEDGE mode does not acknowledge messages, the broker would hold those UnAck messages until the consumer client acknowledges those messages.
          How can I increase the memory of the queue?
          Please see OpenMQ Administration Guide "Java Virtual Machine Adjustments" and "Broker Memory Management Adjustments"
          http://docs.sun.com/app/docs/doc/821-0027/aeokk?l=en&a=view
          • 2. Re: Low Memory Queue in OpenMQ
            807581
            I did check the UnAck message count. its always zero. I am actually using AUTO_ACKNOLEDGE mode to acknowledge the messages. Below is how it looks when i did metrics and list on the queue.
            -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
            ---------------------------------------------------------------------------------------
            Name Type State Producers Consumers Msgs
            Active Backup Count Remote UnAck Avg Size
            ---------------------------------------------------------------------------------------
            FETCHQUEUE Queue RUNNING 0 - 2 0 339 0 339
            NETRICSQUEUE Queue RUNNING 0 - 3 0 386 0 386
            mq.sys.dmq Queue RUNNING 0 - 0 0 0 0 0

            Successfully listed destinations.

            ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
            ------------------------------------
            Destination Name Destination Type
            ------------------------------------
            FETCHQUEUE Queue

            On the broker specified by:

            -------------------------
            Host Primary Port
            -------------------------
            localhost 7676

            ----------------------------------
            Reserved Used Utilization Ratio
            ----------------------------------
            78080 77824 99

            ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
            • 3. Re: Low Memory Queue in OpenMQ
              807581
              You can see the utilization ratio is 99% without any UnAck messages.

              -----------------------------------------------------------------------------------------
              Msgs Msg Bytes Msg Count Total Msg Bytes (k) Largest
              In Out In Out Current Peak Avg Current Peak Avg Msg (k)
              -----------------------------------------------------------------------------------------
              256844 256844 39810809 39810809 0 3203 824 0 484 124 < 1
              256845 256845 39810964 39810964 0 3203 824 0 484 124 < 1