*
The moose likes Web Services and the fly likes Mule 2.0 and infinite loops Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Mule 2.0 and infinite loops" Watch "Mule 2.0 and infinite loops" New topic
Author

Mule 2.0 and infinite loops

Sander Evanfield
Greenhorn

Joined: Oct 15, 2004
Posts: 13
When using mule 2.0, need to handle poison message for a jms endpoint. Mule goes to infinite loop

My configuration files are:

jms:endpoint name="someChannel" queue="${some.q}" connector-ref="EMSConnector"
synchronous="true">

jms:connector name="EMSConnector" acknowledgementMode="DUPS_OK_ACKNOWLEDGE" durable="false"
noLocal="true" persistentDelivery="true" maxRedelivery="3" cacheJmsSessions="true" eagerConsumer="false"
specification="1.1" connectionFactory-ref="EMSConnectionFactory" username="${ems.usr.name}" password="${ems.usr.passwd}"
redeliveryHandlerFactory-ref="RedeliveryHandlerFactory" createMultipleTransactedReceivers="false"
numberOfConcurrentTransactedReceivers="1">
<spring:property name="exceptionListener" ref="OMSExceptionStrategy"/>
</jms:connector>

<spring:bean name="RedeliveryHandlerFactory" class="org.mule.transport.jms.CountingRedeliveryHandlerFactory" />

spring:bean name="EMSConnectionFactory" class="com.tibco.tibjms.TibjmsQueueConnectionFactory">
<spring:constructor-arg value="${ems.host.name}" />
</spring:bean>

How can I redesign this to handle a poison message and prevent infinite loop.


xxx
Praful Thakare
Ranch Hand

Joined: Feb 10, 2001
Posts: 614
maxRedelivery="2" ??


All desirable things in life are either illegal, banned, expensive or married to someone else !!!
Sander Evanfield
Greenhorn

Joined: Oct 15, 2004
Posts: 13
Can you elaborate on why reMaxDelivery = 2 works instead of any finite number (in my case 3)
Praful Thakare
Ranch Hand

Joined: Feb 10, 2001
Posts: 614
oh, I did not realized you have defined it already, nothing special about 2, I just picked it randomly.But did it work by changing value to 2?
if not then I would suggest to inspect redelivery count property of message, it should increment everytime the message is put back to queue, is it incrementing?

 
Consider Paul's rocket mass heater.
 
subject: Mule 2.0 and infinite loops