We have Jboss6 application server 23 different MDBs listening 23 different queues are deployed and All MDBs have minSession=1 and maxSession=1. StrictMaxPool in is set to 15. Queues are created in HornetQ Server version 2.2.14.Final (HQ_2_2_14_FINAL, 122) and running in separate jvm And WorkManagerThreadPool is set as below. <bean name="WorkManagerThreadPool" class="org.jboss.util.threadpool.BasicThreadPool"> <!-- Expose via JMX --> <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.jca:service=WorkManagerThreadPool", exposedInterface=org.jboss.util.threadpool.BasicThreadPoolMBean.class)</annotation> <!-- The name that appears in thread names --> <property name="name">WorkManager</property> <!-- The maximum amount of work in the queue --> <property name="maximumQueueSize">1024</property> <!-- The maximum number of active threads --> <property name="maximumPoolSize">100</property> <!-- How long to keep threads alive after their last work (default one minute) --> <property name="keepAliveTime">60000</property> </bean>
I go through https://access.redhat.com/documentation/en-us/jboss_enterprise_application_platform/5/html/performance_tuning_guide/sect-performance_tuning_guide-message_driven_beans What I understood is that 1. There can be max 15 MDBs instances say mdb1 to mdb15 in mdb instance pool. 2. If all these MDBs mdb1 to mdb15 are busy in processing messages and a new message comes to queue say Q16, a new instance of mdb16 will be created. 3. 16 Thread form WorkManagerThreadPool will be used by jboss to executed 16 MDB instances. 4. If any MDB has misSession > 1 then there will be as many mdb instances of that MDB in MDB pool. For eg. say mdb1 and mdb2 have minSession=2, then there will be 2 instances of mdb1 + 2 instance of mdb2 + 11 other mdb instances say mdb3 to mdb mdb11 in mdb pool. 5. WorkManagerThreadpool maximumPoolSize can be set equal to sum of maxSessions for all the mdbs assuming that all the mdbs maxsession will be busy in processing.
Did I understood the stuff correctly or missing/misunderstood the concept? What I could not understand 1. How this MDB pool is maintained. Is it LRU or something else. For eg in case of point 2 above, when all the mdbs finished there work, will mdb16 remain in pool and which mdb will be removed from pool. 2. If an MDB has minSession > 1 point 4 above, will it's one instance will be removed and mdb16 will be in pool. 3. From logs I could see msg-consumer 2017-11-08 08:22:52,544 DEBUG (Thread-1574 (group:HornetQ- client-global-threads-271245552):) [mdb.mdb1] Incoming message {HornetQMessage[ID:a1b494dd-c455-11e7-9db5-1866daf41c0c]:PERSISTENT} from queue {HornetQQueue[Q1]} with properties {{JMSXDeliveryCount=1}}.
4. From Chapter 32. Application Server Integration and Java EE paragraph 32.3. MDB and Consumer pool size, if I do not configure maxSession, will 15 sessions per MDB will be created? If yes where will those instances resides? In MDB pool (Resource Adaptor implementation knows nothing about the application servers MDB implementation? From where Thread-1574 is coming if we have set Thread Pool as 100? is it some "global" thread pool? If so in which configuration file it is configured? I read HornetQ threads and comment from jbertram Well, these threads come from a pool (i.e. the "global" pool as you can see by the name) which means you aren't guaranteed to get the same thread everytime. I could not find where this global thread pool is configured. On client consuming messges or on HornetQ server? Also from logs I could see that some mdbs stop consuming messages for a while and then start again. For eg. mdb1 to mdb6 listen for some time and then stop. Then after some time again start listening. This happens even if there are thousands of messages in queue. Can someone please spare some time to explain the above points? and also refer some good tutorial/book to understand these configuration and there impact deeply. Thanks. |