Question

I have a mule flow which reads messages from a sonic topic and publish to a Websphere MQ Topic. The flow is synchronous and transacted. I have set maxRedelivery="10" in the inboud endpoint. but it keeps on trying to redeliver. Here is the exception I get:

ERROR 2014-03-03 15:13:08,763 [JMS Session Delivery Thread - $TMPAPPID$544239$$SESSION$0:-3441129419112818566]    org.mule.exception.DefaultMessagingExceptionStrategy: 
********************************************************************************
Message               : "Message with id "ID:1419c04f:da190005:1448992ACB1" has been redelivered 1,511 times on  endpoint "jms://topic:testtopic", which exceeds the maxRedelivery setting of 10 on the connector "sonicMQConnectorSub".  Message payload is of type: TextMessage
Code                  : MULE_ERROR--2
--------------------------------------------------------------------------------
Exception stack is:
1. "Message with id "ID:1419c04f:da190005:1448992ACB1" has been redelivered 1,511 times on endpoint "jms://topic:testtopic", which exceeds the maxRedelivery setting of 10 on the connector "sonicMQConnectorSub". Message payload is of type: TextMessage (org.mule.transport.jms.redelivery.MessageRedeliveredException)
  org.mule.transport.jms.redelivery.JmsXRedeliveryHandler:91 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/transport/jms/redelivery/MessageRedeliveredException.html)
--------------------------------------------------------------------------------
Root Exception stack trace:
org.mule.transport.jms.redelivery.MessageRedeliveredException: "Message with id "ID:1419c04f:da190005:1448992ACB1"   has been redelivered 1,511 times on endpoint "jms://topic:testtopic", which exceeds the maxRedelivery setting of 10 on   the connector "sonicMQConnectorSub". Message payload is of type: TextMessage
    at org.mule.transport.jms.redelivery.JmsXRedeliveryHandler.handleRedelivery(JmsXRedeliveryHandler.java:91)
    at org.mule.transport.jms.MultiConsumerJmsMessageReceiver$JmsWorker.preProcessMessage(MultiConsumerJmsMessageReceiver.java:426)
    at org.mule.transport.AbstractReceiverWorker$1$1.process(AbstractReceiverWorker.java:120)
+ 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything)
********************************************************************************

Here is the flow I use.

<jms:connector name="sonicMQConnectorSub" specification="1.1" validateConnections="true"  maxRedelivery="10" connectionFactory-ref="soniqMQConnectionFactorySub" doc:name="JMS" clientId="${topic.sub.clientId}" durable="true"/>
<spring:beans>
    <spring:bean id="soniqMQConnectionFactoryBeanSub" name="soniqMQConnectionFactorySub" class="progress.message.jclient.ConnectionFactory">
        <spring:property name="connectionURLs" value="${topic.sub.providerUrls}" />
        <spring:property name="defaultUser" value="${topic.sub.username}" />
        <spring:property name="defaultPassword" value="${topic.sub.password}" />
    </spring:bean>
</spring:beans>

<jms:connector name="wsMQConnector" specification="1.1" username="${topic.pub.username}" password="${topic.pub.password}" validateConnections="true" connectionFactory-ref="wsMQConnectionFactory" doc:name="JMS" clientId="${topic.pub.clientId}"/>
<spring:beans>
    <spring:bean id="wsMQConnectionFactory" class="com.ibm.mq.jms.MQTopicConnectionFactory">
        <spring:property name="transportType" value="1"/>
        <spring:property name="hostName" value="${topic.pub.host}"/>
       <spring:property name="port" value="${topic.pub.port}"/>
        <spring:property name="channel" value="${topic.pub.channel}"/>
        <spring:property name="queueManager" value="${topic.pub.queueManager}"/>
    </spring:bean>
</spring:beans>

<flow name="Flow1" doc:name="Flow1" processingStrategy="synchronous">
    <jms:inbound-endpoint doc:name="JMS" connector-ref="sonicMQConnectorSub" topic="${topic.sub.name}" >
        <jms:transaction action="ALWAYS_BEGIN" /> 
    </jms:inbound-endpoint>
    <message-properties-transformer doc:name="Message Properties">           
        <add-message-property key="SENTTIMESTAMP" value="#[server.dateTime]"/>            
    </message-properties-transformer>
    <logger message="Payload: #[message.payload]" level="INFO" doc:name="Logger"/>
   <jms:outbound-endpoint doc:name="JMS" connector-ref="wsMQConnector" topic="${topic.pub.name}">
        <jms:transaction action="ALWAYS_JOIN" />
    </jms:outbound-endpoint> 

</flow>

No correct solution

OTHER TIPS

This is expected behavior, the above exception is raised when the maximum redelivery count defined in maxRedelivery has been exceeded by your JMS provider. See the answer by David Dossot here: jms Mule max redelivery exceeded

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top