I am using JBoss 3.2.5 and trying to use JMS queues. I have set up a queue and a message-driven EJB.
My question has to do with the instance pool for the message-driven beans. When I send a message to the queue, JBoss creates 11 instances of my message-driven bean and onMessage is invoked on all of them.
I thought when using JMS queues, each message has only one consumer?
So my question is in 2 parts:
1. How do I configure the queue so that each message has one consumer? i.e. onMessage is invoked on only one bean.
2. Can I control the size of the instance pool for the message driven beans? I would like to limit the number of beans that can exist at any one time. If more messages come in than there are beans, I would like for it to wait until an existing bean is free instead of creating a new one. I noticed there is a MaxPoolSize attribute in the jmx console, but setting it for the message-driven bean does not seem to have any effect.
I had the same problem. The MDB instances are held in a pool. JBossMQ starts a number of them when the MDB reads in the queue. The number of instances can be customized in