Why JBoss EAP 7
create only one consumer with Active MQ
(not Artemis
)? How to increase number of consumer?
I've tried:
- increase maxSession
ActivationConfigProperty
- increase mdb pool size (via
bean-instance-pools
tag) - set min/max pool size inside
connection-definition
tag
My configuration:
mdb-pool configuration
<subsystem xmlns="urn:jboss:domain:ejb3:5.0">
...
<mdb>
<resource-adapter-ref resource-adapter-name="com.icl.amq.jmsra.rar"/>
<bean-instance-pool-ref pool-name="mdb-strict-max-pool"/>
</mdb>
<pools>
<bean-instance-pools>
<strict-max-pool name="slsb-strict-max-pool" max-pool-size="5" instance-acquisition-timeout="10" instance-acquisition-timeout-unit="MINUTES"/>
<strict-max-pool name="mdb-strict-max-pool" max-pool-size="40" instance-acquisition-timeout="10" instance-acquisition-timeout-unit="MINUTES"/>
</bean-instance-pools>
</pools>
...
resource-adapter configuration
<subsystem xmlns="urn:jboss:domain:resource-adapters:5.0">
...
<resource-adapter id="amq.jmsra.main">
...
<connection-definitions>
<connection-definition class-name="org.apache.activemq.ra.ActiveMQManagedConnectionFactory" jndi-name="${amq.jndi.factory}" enabled="true" pool-name="ConnectionFactory">
<xa-pool>
<min-pool-size>10</min-pool-size>
<initial-pool-size>10</initial-pool-size>
<max-pool-size>35</max-pool-size>
</xa-pool>
</connection-definition>
</connection-definitions>
</resource-adapter>
...
MDB code:
@MessageDriven(activationConfig = {
@ActivationConfigProperty(propertyName = "connectionFactoryLookup", propertyValue = "${amq.jndi.factory}"),
@ActivationConfigProperty(propertyName = "destination", propertyValue = "in_queue"),
@ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
@ActivationConfigProperty(propertyName="minSessions", propertyValue="5"),
@ActivationConfigProperty(propertyName="maxSessions", propertyValue="40")
})
@ResourceAdapter("amq.jmsra.main")
public class ServerMessageListener implements MessageListener {
...
I expect this configuration increase number of consumers, however when viewing the status of queues from ActiveMQ
web console I see only 1 consumer.