I am trying to use messages from an ActiveMQ queue in grails. I have configured several spring beans to connect, and so far everything is working fine.
The problem starts when I try to set concurrentConsumers
above 8. It seems that 8 is installed as a maximum for one client - if I configure more than 8, 8 consumers for the queue are still displayed in ActiveMQ Explorer. If I configure two listeners for different queues with more than 8 concurrentConsumers
, the number of consumers shown by ActiveMQ oszillate, but the sum is always 8.
What am I doing wrong? Configuration examples show concurrentConsumers up to 50 ...
Here is my configuration written as groovy DSL, I think it is not a problem to read it ...
jmsFactory(org.apache.activemq.pool.PooledConnectionFactory) { bean -> bean.destroyMethod = "stop" connectionFactory = { org.apache.activemq.ActiveMQConnectionFactory cf -> brokerURL = "tcp://localhost:61616" } } jmsTemplate(org.springframework.jms.core.JmsTemplate) { connectionFactory = jmsFactory } jmsMessageListener(org.springframework.jms.listener.adapter.MessageListenerAdapter, ref("messageService")) { defaultListenerMethod = "onMessage" } jmsContainer(org.springframework.jms.listener.DefaultMessageListenerContainer) { connectionFactory = jmsFactory concurrency="10" concurrentConsumers="15" destinationName = "demoQueue" messageListener = jmsMessageListener transactionManager = ref("transactionManager") autoStartup = false } jmsMessageListener2(org.springframework.jms.listener.adapter.MessageListenerAdapter, ref("messageService")) { defaultListenerMethod = "onMessage2" } jmsContainer2(org.springframework.jms.listener.DefaultMessageListenerContainer) { connectionFactory = jmsFactory destinationName = "demoQueue2" messageListener = jmsMessageListener2 transactionManager = ref("transactionManager") autoStartup = false }
source share