Nilantha Jayalath wrote:
> 
> 
> Thanks Christopher I did as you suggested but still the consumer stop
> receiving after the first exception. Only way to get those remaining
> messages 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 queue.
> 
> this is the last log statement I see
> ServerSessionImpl:0 pool-1-thread-2 - Endpoint failed to process message.
> Reason: java.lang.RuntimeException: Endpoint after delivery notification
> failure
> 
> this is my configuration... I am missing anything else here?
> 
>   <bean id="transactionManager"
> class="org.jencks.factory.TransactionManagerFactoryBean"/>
> 
>   <bean id="connectionManager"
> class="org.jencks.factory.ConnectionManagerFactoryBean">
>     <property name="transactionManager" ref="transactionManager"/>
>   </bean>
> 
>   <bean id="jmsManagedConnectionFactory"
> class="org.apache.activemq.ra.ActiveMQManagedConnectionFactory">
>     <property name="resourceAdapter" ref="activeMQResourceAdapter"/>
>   </bean>
> 
>   <bean id="jmsConnectionFactory"
> class="org.jencks.factory.ConnectionFactoryFactoryBean">
>     <property name="managedConnectionFactory"
> ref="jmsManagedConnectionFactory"/>
>     <property name="connectionManager" ref="connectionManager"/>
>   </bean>
> 
>   <bean id="MyQueue" class="org.apache.activemq.command.ActiveMQQueue">
>               <constructor-arg index="0" value="net.xxx.PostQueue" />
>   </bean>
>       
>   <!--
>   || Jencks JCA Container
>   -->
>   <bean id="jencks" class="org.jencks.JCAContainer">
>     <property name="transactionManager" ref="transactionManager"/>
>     <property name="threadPoolSize" value="150"/>
>     <property name="resourceAdapter" ref="activeMQResourceAdapter" />
>   </bean>
>   <bean id="activeMQResourceAdapter"
> class="org.apache.activemq.ra.ActiveMQResourceAdapter">
>       <property name="serverUrl"
>               
> value="tcp://xxx:61416?jms.redeliveryPolicy.allPrefetchValues=1&amp;jms.redeliveryPolicy.initialRedeliveryDelay=2000&amp;jms.redeliveryPolicy.maximumRedeliveries=4&amp;jms.redeliveryPolicy.useCollisionAvoidance=true"
> />
>   </bean>
> 
>   <!--
>     || an inbound message connector using a stateful, pooled 
> MessageListener
>     -->
>   <bean id="inboundConnectorB" 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=" MyQueue"/>
>         <property name="destinationType" value="javax.jms.Queue"/>
>       </bean>
>     </property>
> 
>     <!-- This example uses a non pooled bean -->
>     <property name="ref" value="echoBean"/>
>   </bean>
> 
> 


Christopher G. Stach II wrote:
> 
> Nilantha wrote:
>> 
>> Nilantha wrote:
>>> I did the change as suggested(had to replace '&' with ';')
>>>
>>> <property name="serverUrl"
>>>             
>>> value="failover:(tcp://xxx:61416,tcp://xxx:61417)?jms.redeliveryPolicy.allPrefetchValues=1;jms.redeliveryPolicy.initialRedeliveryDelay=2000;jms.redeliveryPolicy.maximumRedeliveries=4;jms.redeliveryPolicy.useCollisionAvoidance=true;"
>>> />
>>>
>>> now I am getting following NPE from ConnectionStateTracker as soon as an
>>> exception is thrown.
>>>
> 
> I don't think that's going to be a valid URL with semicolons.  Maybe
> &amp; instead of &?
> 
> -- 
> Christopher G. Stach II
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Testing-%22maximumRedeliveries%22...-MDP-does-not-receives-messages-once-an-Exception-is-thrown...-tf3162722.html#a8807375
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to