activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sgt_ty <scott_tyri...@mgic.com>
Subject pooling message driven pojo's with spring
Date Fri, 21 Apr 2006 20:26:55 GMT

Hello,
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"/>
        </bean>
      </property>
      <property name="ref" value="exampleMDP"/>
   </bean>
--
View this message in context: http://www.nabble.com/pooling-message-driven-pojo%27s-with-spring-t1488830.html#a4033573
Sent from the ActiveMQ - User forum at Nabble.com.


Mime
View raw message