1 Reply Latest reply on Oct 7, 2019 4:04 AM by devatrabo

    maxSession property not working on JBoss EAP 7.2

    devatrabo

      We noticed our MDB is performing too slow and not using the maxSession property.

       

      Infrastructure:

      JBoss 7.2 EAP

      Active MQ 5.15.9

      Active MQ Resource Adapter - 5.15.9

       

      Single Machine Running Active MQ and JBoss.

       

      JBoss is configured to connect to external(on same machine) Active MQ. Configuration is as under.

      JBoss Resource Adapter configuration

      <subsystem xmlns="urn:jboss:domain:resource-adapters:5.0">

                  <resource-adapters>

                      <resource-adapter id="activemq-rar.rar">

                          <archive>

                              activemq-rar.rar

                          </archive>

                          <transaction-support>XATransaction</transaction-support>

                          <config-property name="ServerUrl">

                              tcp://localhost:61616?jms.rmIdFromConnectionId=true

                          </config-property>

                          <config-property name="UserName">

                              admin

                          </config-property>

                          <config-property name="Password">

                              admin

                          </config-property>

                          <connection-definitions>

                              <connection-definition class-name="org.apache.activemq.ra.ActiveMQManagedConnectionFactory" jndi-name="java:jboss/jms/QCF" enabled="true" pool-name="qcf">

                                  <xa-pool>

                                      <min-pool-size>20</min-pool-size>

                                      <max-pool-size>50</max-pool-size>

                                      <prefill>false</prefill>

                                      <is-same-rm-override>false</is-same-rm-override>

                                  </xa-pool>

                                  <recovery>

                                      <recover-credential>

                                          <user-name>admin</user-name>

                                          <password>admin</password>

                                      </recover-credential>

                                  </recovery>

                              </connection-definition>

                          </connection-definitions>

                          <admin-objects>

                              <admin-object class-name="org.apache.activemq.command.ActiveMQQueue" jndi-name="java:/jms/SampleQ" pool-name="SampleQ">

                                  <config-property name="PhysicalName">

                                      SampleQ

                                  </config-property>

                              </admin-object>

                          </admin-objects>

                      </resource-adapter>

                  </resource-adapters>

              </subsystem>

       

       

      MDB Pool Configuration

      MDB EJB Configuration

      <subsystem xmlns="urn:jboss:domain:ejb3:5.0">

                  <session-bean>

                      <stateless>

                          <bean-instance-pool-ref pool-name="slsb-strict-max-pool"/>

                      </stateless>

                      <stateful default-access-timeout="5000" cache-ref="simple" passivation-disabled-cache-ref="simple"/>

                      <singleton default-access-timeout="5000"/>

                  </session-bean>

                  <mdb>

                      <resource-adapter-ref resource-adapter-name="activemq-rar.rar"/>

                      <bean-instance-pool-ref pool-name="opf_pool"/>

                  </mdb>

                  <pools>

                      <bean-instance-pools>

                          <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="slsb-strict-max-pool" derive-size="from-worker-pools" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>

                          <strict-max-pool name="opf_pool" max-pool-size="300" instance-acquisition-timeout="3" instance-acquisition-timeout-unit="MINUTES"/>

                      </bean-instance-pools>

                  </pools>

                  <caches>

                      <cache name="simple"/>

                      <cache name="distributable" passivation-store-ref="infinispan" aliases="passivating clustered"/>

                  </caches>

                  <passivation-stores>

                      <passivation-store name="infinispan" cache-container="ejb" max-size="10000"/>

                  </passivation-stores>

                  <async thread-pool-name="default"/>

                  <timer-service thread-pool-name="default" default-data-store="default-file-store">

                      <data-stores>

                          <file-data-store name="default-file-store" path="timer-service-data" relative-to="jboss.server.data.dir"/>

                      </data-stores>

                  </timer-service>

                  <remote connector-ref="http-remoting-connector" thread-pool-name="default">

                      <channel-creation-options>

                          <option name="READ_TIMEOUT" value="${prop.remoting-connector.read.timeout:20}" type="xnio"/>

                          <option name="MAX_OUTBOUND_MESSAGES" value="1234" type="remoting"/>

                      </channel-creation-options>

                  </remote>

                  <thread-pools>

                      <thread-pool name="default">

                          <max-threads count="10"/>

                          <keepalive-time time="100" unit="milliseconds"/>

                      </thread-pool>

                  </thread-pools>

                  <iiop enable-by-default="false" use-qualified-name="false"/>

                  <default-security-domain value="other"/>

                  <default-missing-method-permissions-deny-access value="true"/>

                  <log-system-exceptions value="true"/>

              </subsystem>

       

      Now, I have a single MDB which reads a message form the queue. I put 100,000 messages on the queue and then deploy my MDB, but in logs I see only 10 threads consuming messages concurrently, however I would assume it should be 15(same as maxSession).

       

      My MDB configuration

      MDB Configuration

      <message-driven>

      <ejb-name>SampleMDB</ejb-name>

      <activation-config>

      <activation-config-property>

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

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

      </activation-config-property>

      <activation-config-property>

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

      <activation-config-property-value>javax.jms.Queue</activation-config-property-value>

      </activation-config-property>

      <activation-config-property>

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

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

      </activation-config-property>

      <activation-config-property>

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

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

      </activation-config-property>

      <activation-config-property>

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

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

      </activation-config-property>

      </activation-config>

      </message-driven>

       

       

      Runtime statistics from JBoss CLI.

       

      Runtime statistics

       

       

      [standalone@localhost:9990 /] /deployment=mdb.performance.ear-0.0.1.ear/subdeployment=mdb.performance-0.0.1.jar/subsystem=ejb3/message-driven-bean=SampleMDB:read-resource(include-runtime=true)

      {

          "outcome" => "success",

          "result" => {

              "component-class-name" => "SampleMDB",

              "declared-roles" => [],

              "delivery-active" => true,

              "execution-time" => 0L,

              "invocations" => 0L,

              "methods" => {},

              "peak-concurrent-invocations" => 0L,

              "pool-available-count" => 300,

              "pool-create-count" => 10,

              "pool-current-size" => 10,

              "pool-max-size" => 300,

              "pool-name" => "opf_pool",

              "pool-remove-count" => 0,

              "run-as-role" => undefined,

              "security-domain" => "other",

              "timers" => [],

              "wait-time" => 0L,

              "service" => undefined

          }

      }

       

       

      [standalone@localhost:9990 /]

       

      Can someone help me in this? Where is this going wrong or which property I need to set more to increase the concurrency of this MDB?

       

      Thanks in advance.

       

      regards, Bhupesh

        • 1. Re: maxSession property not working on JBoss EAP 7.2
          devatrabo

          This is not a problem anymore. A silly mistake. Its "maxSessions" and not "maxSession".

           

          After changing the property and increasing the maxSession to 30, we see the following output.

           

          [standalone@localhost:9990 /] /deployment=mdb.performance.ear-0.0.1.ear/subdeployment=mdb.performance-0.0.1.jar/subsystem=ejb3/message-driven-bean=SampleMDB:read-resource(include-runtime=true)

          {

              "outcome" => "success",

              "result" => {

                  "component-class-name" => "SampleMDB",

                  "declared-roles" => [],

                  "delivery-active" => true,

                  "execution-time" => 0L,

                  "invocations" => 0L,

                  "methods" => {},

                  "peak-concurrent-invocations" => 0L,

                  "pool-available-count" => 292,

                  "pool-create-count" => 30,

                  "pool-current-size" => 30,

                  "pool-max-size" => 300,

                  "pool-name" => "opf_pool",

                  "pool-remove-count" => 0,

                  "run-as-role" => undefined,

                  "security-domain" => "other",

                  "timers" => [],

                  "wait-time" => 0L,

                  "service" => undefined

              }

          }

           

           

          [standalone@localhost:9990 /]