1 Reply Latest reply on Aug 22, 2017 12:34 AM by ion_mayank

    Unable to read JMS messages in same Order from Queue on WildFly 10.1

    ion_mayank

      I am migrating our application from Jboss AS 5 to Wildfly10.1. In one of the flows we need to process the messages in same order in which they were put on the Queue. However messages order is changed by Wildfly on delivery to MDB (Artemis-MQ probably).

      After searching web I deployed my MDB with MaxSessions property of "1" and configured a new pool with max size of "1". Post this only ONE MDB instance is created (as required) by the Wildfly server but messages are still NOT getting consumed by MDB in order they were put by the producer on the Queue.

      Also, I am seeing consumer count on the Queue as 15 (see below Jboss CLI snapshot) when only 1 MDB instance is allowed by below configuration.

       

      Attaching below the complete configuration I have done. Please help me resolve this issue.

       

      I am using following configuration:

       

      1. My MDB's jboss-ejb3.xml is as follows: 

      <enterprise-beans>

               <message-driven>

                  <ejb-name>OrderedInputMessageProcessor</ejb-name>

                  <ejb-class>com.mymdb.InputMessageProcessorMDB</ejb-class>

                  <activation-config>

                     <activation-config-property>

                        <activation-config-property-name>maxSessions</activation-config-property-name>

                        <activation-config-property-value>1</activation-config-property-value>

                     </activation-config-property>

                  </activation-config>

               </message-driven>

            </enterprise-beans>

            <assembly-descriptor>

              <p:pool>

                    <ejb-name>OrderedInputMessageProcessor</ejb-name>

                    <p:bean-instance-pool-ref>bean-singleton-pool</p:bean-instance-pool-ref>

              </p:pool>

            </assembly-descriptor>

         </jboss:ejb-jar>

       

       

      2. Pool configuration in my standalone.xml configuration file:

                  <pools>

                      <bean-instance-pools>

                          <strict-max-pool name="slsb-strict-max-pool" derive-size="from-worker-pools" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>

                          <strict-max-pool name="mdb-strict-max-pool" derive-size="from-cpu-count" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>

                          <strict-max-pool name="bean-singleton-pool" max-pool-size="1" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>

                      </bean-instance-pools>

                  </pools>

       

      3. MDB view on Jboss CLI:

       

      4. Queue at runtime on Jboss CLI: