-
1. Re: How to increase the number of MDB instances listening to a WildFly JMS queue
jbertram Jul 2, 2015 9:51 AM (in response to hard_alex)1 of 1 people found this helpfulThere's a few things to consider here:
- The number of sessions that the JCA RA can use concurrently to consume messages.
- 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.
-
2. Re: How to increase the number of MDB instances listening to a WildFly JMS queue
hardex Jul 6, 2015 10:21 AM (in response to jbertram)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 Nov 30, 2016 1:51 PM (in response to jbertram)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).
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 Dec 7, 2016 8:47 AM (in response to cennore)I replied over on your other thread - Wildfly restricts number of consumers with ActiveMQ Resource Adapter.