This is my configuration file
<bean id="soapMessageCreator" class="XXX.SOAPMessageCreator"/>
<bean id="myDeadLetterErrorHandler"
class="org.apache.camel.builder.DeadLetterChannelBuilder">
<property name="deadLetterUri"
value="activemq:queue:queue.DeadLetter"/>
<property name="redeliveryPolicy"
ref="myRedeliveryPolicyConfig"/>
<property name="useOriginalMessage" value="true"/>
<property name="handled" value="false"/>
</bean>
<bean id="myRedeliveryPolicyConfig"
class="org.apache.camel.processor.RedeliveryPolicy">
<property name="maximumRedeliveries" value="4"/>
<property name="redeliverDelay" value="250"/>
</bean>
<camelContext id="camel" xmlns="http://camel.apache.org/schema/spring" >
<package>org.apache.camel.example.jmstofile</package>
<route errorHandlerRef="myDeadLetterErrorHandler">
<from
uri="activemq:topic:topic.Patient?clientId=testCamelClient&durableSubscriptionName=zyz123"/>
<to uri="bean:soapMessageCreator"/>
<multicast>
<to
uri="http://mpkl04l34h9g2:8080/serviceone/subscriber"/>
<to
uri="http://mpkl04l34h9g2:8080/servicetwo/subscriber"/>
</multicast>
</route>
</camelContext>
<bean id="http" class="org.apache.camel.component.http.HttpComponent">
<property name="camelContext" ref="camel"/>
<property name="httpConnectionManager" ref="myHttpConnectionManager"/>
</bean>
<bean id="myHttpConnectionManager"
class="org.apache.commons.httpclient.MultiThreadedHttpConnectionManager">
<property name="params" ref="myHttpConnectionManagerParams"/>
</bean>
<bean id="myHttpConnectionManagerParams"
class="org.apache.commons.httpclient.params.HttpConnectionManagerParams">
<property name="defaultMaxConnectionsPerHost" value="5"/>
</bean>
here, if one of my "to" destination is down, I see two messages in the DLQ.
also, i want to modify the message header with the name of the destination
that failed for example if service
"http://mpkl04l34h9g2:8080/servicetwo/subscriber" was down, I want to add
"http://mpkl04l34h9g2:8080/servicetwo/subscriber" to messager/header/target
before delivering the message to DLQ so that the admin process which checks
messages in DLQ knows which are the targets which did not receive the
message.
Please suggest what can be done to achieve this.
--
View this message in context:
http://www.nabble.com/modify-message-before-delivering-to-Dead-Letter-Queue-tp25827098p25827098.html
Sent from the Camel - Users mailing list archive at Nabble.com.