4 Replies Latest reply on Dec 7, 2016 8:47 AM by jbertram

    How to increase the number of MDB instances listening to a WildFly JMS queue

    hard_alex

      Hi, All

       

      The default settings - 15 instances. I need more threads for query handling, up to 100 or 200.

       

      I tied that parameter, but it doesn't work:

      @ActivationConfigProperty( propertyName = "maxSession", propertyValue = "100")

       

      And I think, it is only for jBoss, not for WildFly.

       

      Any proposals?

        • 1. Re: How to increase the number of MDB instances listening to a WildFly JMS queue
          jbertram

          There's a few things to consider here:

           

          1. The number of sessions that the JCA RA can use concurrently to consume messages.
          2. The number of MDB instances available to concurrently receive messages from the JCA RA's sessions.

           

          Number 1 is controlled by the "maxSession" activation configuration property on the MDB.

           

          Number 2 is controlled by the bean-instance-pool-ref configured for MDBs in the "ejb3" subsystem in the server configuration (e.g. standalone-full.xml).  Here's the default configuration for Wildfly 8.2:

           

                      <mdb>
                          <resource-adapter-ref resource-adapter-name="${ejb.resource-adapter-name:hornetq-ra.rar}"/>
                          <bean-instance-pool-ref pool-name="mdb-strict-max-pool"/>
                      </mdb>
                      <pools>
                          <bean-instance-pools>
                              <!-- A sample strict max pool configuration -->
                              <strict-max-pool name="slsb-strict-max-pool" max-pool-size="20" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>
                              <strict-max-pool name="mdb-strict-max-pool" max-pool-size="20" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>
                          </bean-instance-pools>
                      </pools>
          

           

          If you want to process up to 100 or 200 messages concurrently then both #1 and #2 need to be configured accordingly.

          1 of 1 people found this helpful
          • 2. Re: How to increase the number of MDB instances listening to a WildFly JMS queue
            hardex

            Thank you for answer ...

            We changed logic and move some critical/heavy process to other part of the system.

            So this recommendation check little after ...

            • 3. Re: How to increase the number of MDB instances listening to a WildFly JMS queue
              cennore

              Hi Justin,

               

              I have and MDB with the following configuration:

               

              @ResourceAdapter(value = "activemq")

              @MessageDriven(mappedName = "queue/Vou", activationConfig = {

                @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),

                @ActivationConfigProperty(propertyName="destination", propertyValue="queue/Vou"),

                @ActivationConfigProperty(propertyName = "maxSessions", propertyValue = "40"),

                @ActivationConfigProperty(propertyName = "maxMessagesPerSessions", propertyValue = "1000"),

                @ActivationConfigProperty(propertyName = "enableBatch", propertyValue = "true"),

                @ActivationConfigProperty(propertyName = "maxMessagesPerBatch", propertyValue = "100"),

                @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge")})

               

              However I still see just a single consumer listening on the queue via ActiveMq web console (see attached screenshot).

               

              Capture.PNG

              I really would appreciate any advise pls! I've been on this issue for over a year now; left it at some point and did some alternative coding, but some how it has come up again and I would like to resolve this once and for all. It shouldn't be this hard

              • 4. Re: How to increase the number of MDB instances listening to a WildFly JMS queue
                jbertram