activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nilantha Jayalath" <>
Subject RE: No effect on maximumRedeliveries setting
Date Fri, 02 Feb 2007 17:02:21 GMT
Thanks James for your explanation on Connection Factories,

Now I am using Jencks for inbound. I am throwing a Runtime exception in
order to test max redelivery setting (I couldn't find any better way to
test with MDPs). If there are no exceptions thrown from MDP messages
could be consumed continuously. But as soon as an exception is thrown
MDP no longer receives messages. Only way to get those consumed is
restart the app with consumers again and again. Each time I see
rediliveryCount has been increased by 1 for any message remained the

This is how I have configured "maximumRedeliveries"

  <bean id="activeMQResourceAdapter"
    <property name="serverUrl" value="tcp://"/>
        <property name="maximumRedeliveries"><value>3</value></property>
        <property name="allPrefetchValues"><value>1</value></property>


  <bean id="jencks" class="org.jencks.JCAContainer">
  	<property name="bootstrapContext">
        <bean class="org.jencks.factory.BootstrapContextFactoryBean">
          <property name="transactionManager" ref="transactionManager"/>
          <property name="threadPoolSize" value="25"/>
    <property name="resourceAdapter" ref="activeMQResourceAdapter" />

Am I missing anything here? Thank you in advance for any idea on this


-----Original Message-----
From: James Strachan [] 
Sent: Friday, February 02, 2007 8:02 AM
Subject: Re: No effect on maximumRedeliveries setting


So just to make things 100% clear - the purpose of
PooledConnectionFactory is only for use outside of a J2EE container
and when not using JCA - for users who want to use Spring's
JmsTemplate (i.e. for sending messages only).

For an example of inbound and outbound messaging with JCA here you



Note that neither examples use PooledConnectionFactory since JCA does
all the pooling for you for both inbound and outbound (as well as
registering with XA etc)



View raw message