activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sgt_ty <>
Subject pooling message driven pojo's thru spring
Date Fri, 21 Apr 2006 19:23:49 GMT

I am looking for a way allow for a pool of MessageDriven pojo's to act on a
queue. I am porting over code that allowed for a thread pool to read from a
queue and am looking to do similar behavior with ActiveMQ.

Would I simply have to set maxMessagesPerSession and/or maxMessagesPerBatch.
Below is an example of our spring configuration? So in my example below
would this mean that there is a pool of 5 (MDP's) that will read from this
queue? Also could you explain the difference between maxMessagesPerSession
and maxMessagesPerBatch. Is there another site that documents the ActiveMQ
API in greater detail than the online javadoc? Thanks ....

        <!-- tell JCAContainer to set up a connector that listens to the
named queue
        and map messages that are received to your named 'message driven
pojo' -->
  <bean id="exampleConnector" class="org.jencks.JCAConnector">
      <property name="jcaContainer" ref="jencks"/>

      <!-- subscription details -->
      <property name="activationSpec">
      	<bean class="org.apache.activemq.ra.ActiveMQActivationSpec">
            <property name="destination" value="Example.Queue"/>
            <property name="destinationType" value="javax.jms.Queue"/>
             <property name="enableBatch" value="true"/>
            <property name="maxMessagesPerBatch" value="5"/>
      <property name="ref" value="exampleMDP"/>
View this message in context:
Sent from the ActiveMQ - Dev forum at

View raw message