I deployed active-mq resource adapter (5.11.x) in JBoss EAP 6.x for my projects. I just wanted to capture what i found so that it will be helpful to others.
- Typically active-mq broker is deployed separately in a Karaf container which your resource adaptor deployed in JBoss EAP would use for messaging.
- This is different from using HornetQ which is a native messaging broker in EAP 6.x/AS 7. What that means is that many of the configurations that work with HornetQ RA will not work with Active-MQ RA (eg: transactionTimeout)
- Connection pooling can be configured in Active-MQ RA, but it is only used for outbound messages (ie: to the broker)
- Inbound connections does not use the user configured connection pooling mechanism.
- Number of Inbound connections depend on the number of listeners in EAP. What this means is that, if you are using MDB's, each MDB type or class will use one inbound connection irrespective of the number of MDB instances of that MDB type in the bean pool.
eg: <strict-max-pool name="mdb-strict-max-pool" max-pool-size="20" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>
- If you are using message selectors and you have 2 MDB types/classes listening to the same queue, RA will use 2 connections.
- If you observe the # Consumers in Active MQ console, it would match the number of total inbound connections. Note, it would not match the number of MDB bean instances but the MDB bean types.
- Total TCP connections measured on the Active-MQ broker VM would be a total of inbound and outbound connections in EAP (times number of EAP/client instances)
- ActiveMQ threads as configured in maxSessions, will grab an MDB from the bean pool and use it. If the MDB instance is not available, the session thread will wait until an MDB instance is available. For this reason, it is typical to have the maxSession value to be the same as max-pool-size for the MDB
- Another point is that the max-pool-size in the <strict-max-pool> pool is the max number of EJB instances per EJB type/class NOT the total number of instances for all EJB types. For example if you have MDB-A in your app, you may have MDB-A instances up to the max-pool-size defined in <strict-max-pool>
- MDB transactionTimeout configuration is not supported by Active-MQ RA as far as i looked and tested.
I will stand corrected if anyone has a different take on these.