File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Mule 2.0 and infinite loops" Watch "Mule 2.0 and infinite loops" New topic

Mule 2.0 and infinite loops

Sander Evanfield

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"

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="${}" password="${ems.usr.passwd}"
redeliveryHandlerFactory-ref="RedeliveryHandlerFactory" createMultipleTransactedReceivers="false"
<spring:property name="exceptionListener" ref="OMSExceptionStrategy"/>

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

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

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

Praful Thakare
Ranch Hand

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

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

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: 613
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?

I agree. Here's the link:
subject: Mule 2.0 and infinite loops
Similar Threads
mdb and transactions
While Loop Mystery...
mule 2.0 and JMS endpoint
Deploying Mule to JBoss
jms:endpoint in mule 2.0