3 Replies Latest reply on May 17, 2011 2:44 PM by _ trouta

    MDB does not process all messages when overloading the queue

    _ trouta Newbie

      I have a mdb that won't process all the messages that are put into a queue.  For example, I will send initiate 10 messages going into a queue at once, but only 3 of the messages are processed by the MDB.  Using the jmx-console I verify what I am seeing in the logs matches, messagecounter increases by 10 and mdb stats onmessage counter increases by 3.  I don't see any errors in the logs which would indicate any problems, just the lack of the mdb firing. 

       

      I switched the mdb to process messages as a singleton, following the configuration from the first comment of the following article at http://community.jboss.org/wiki/HowDoIGetAnMDBSingleton.   This process is using JBoss version 3.2.7.

       

      Any ideas on why messages are being lost or how to debug the situation?  I am misundertanding the point of having the mdb set as singelton, keeping the process single-threaded, waiting for one message to finish before the next message is processed.

       

      Thanks

        • 1. MDB does not process all messages when overloading the queue
          Wolf-Dieter Fink Master

          Hi Tim,

          could you provide a bit more informations ...

          what JBoss version do you use?

          How it is configured?

          • 2. MDB does not process all messages when overloading the queue
            _ trouta Newbie

            I am using JBoss 3.2.7

             

            <ejb-jar>

            -    <enterprise-beans>
            -      <message-driven>
                    <ejb-name>AutoMoveToPM_MDB</ejb-name>
                    <ejb-class>xaware.mdb.mcao.AutoMoveToPM_MDB</ejb-class>
                    <transaction-type>Container</transaction-type>
                    <acknowledge-mode>AUTO_ACKNOWLEDGE</acknowledge-mode>
            -        <message-driven-destination>
                      <destination-type>javax.jms.Queue</destination-type>

                 </message-driven-destination>

               </message-driven>

            </enterprise-beans>

            </ejb-jar>

             

            -  <jboss>
            -     <enterprise-beans>
            -       <message-driven>
                      <ejb-name>AutoMoveToPM_MDB</ejb-name>
                      <destination-jndi-name>queue/autoMoveToPM</destination-jndi-name>
                      <configuration-name>Singleton Message Driven Bean</configuration-name>
            -          <invoker-bindings>
            -             <invoker>
                            <invoker-proxy-binding-name>singleton-message-driven-bean</invoker-proxy-binding-name>

                      </invoker>

                    </invoker-bindings>

                 </message-driven>

               </enterprise-beans>

            </jboss>

             

            From the standjboss.xml

                  <invoker-proxy-binding>

                     <name>singleton-message-driven-bean</name>

                     <invoker-mbean>default</invoker-mbean>

                     <proxy-factory>org.jboss.ejb.plugins.jms.JMSContainerInvoker</proxy-factory>

                     <proxy-factory-config>

                        <JMSProviderAdapterJNDI>DefaultJMSProvider</JMSProviderAdapterJNDI>

                        <ServerSessionPoolFactoryJNDI>StdJMSPool</ServerSessionPoolFactoryJNDI>

                        <!-- WARN: Don't set this to zero until a bug in the pooled executor is fixed -->

                        <MinimumSize>1</MinimumSize>

                        <MaximumSize>1</MaximumSize>

                        <KeepAliveMillis>30000</KeepAliveMillis>

                        <MaxMessages>1</MaxMessages>

                        <MDBConfig>

                           <ReconnectIntervalSec>10</ReconnectIntervalSec>

                           <DLQConfig>

                              <DestinationQueue>queue/DLQ</DestinationQueue>

                              <MaxTimesRedelivered>10</MaxTimesRedelivered>

                              <TimeToLive>0</TimeToLive>

                           </DLQConfig>

                        </MDBConfig>

                     </proxy-factory-config>

                  </invoker-proxy-binding>

            • 3. MDB does not process all messages when overloading the queue
              _ trouta Newbie

              The problem was that the messages were expiring.  Ask the sender to increase the time to live value.