You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by cmland <qi...@gmail.com> on 2012/02/22 06:47:52 UTC
I want to put extra info as jms head property when the message
deliver to the deadletter queue
my xml file like this:
<camel:route errorHandlerRef="deadLetterErrorHandler" >
<camel:from uri="WMQ:TestQ?disableReplyTo=true"></camel:from>
<camel:transacted></camel:transacted>
<camel:process ref="testProcess"></camel:process>
<camel:to uri="WMQ:TestQ2?disableReplyTo=true"></camel:to>
</camel:route>
<camel:errorHandler id="deadLetterErrorHandler"
type="DeadLetterChannel"
deadLetterUri="WMQ:DEADQ?disableReplyTo=true"
useOriginalMessage="true">
<camel:redeliveryPolicy maximumRedeliveries="2"
redeliveryDelay="100" />
</camel:errorHandler>
I want to put the uri "WMQ:TestQ?disableReplyTo=true" as a jms head property
when the message deliver to deadletter queue.Or add the uri to the message
body before deliver to deadletter queue.
what could i do ,any suggestion?
--
View this message in context: http://camel.465427.n5.nabble.com/I-want-to-put-extra-info-as-jms-head-property-when-the-message-deliver-to-the-deadletter-queue-tp5504201p5504201.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: I want to put extra info as jms head property when the message
deliver to the deadletter queue
Posted by Claus Ibsen <cl...@gmail.com>.
On Wed, Feb 22, 2012 at 7:45 AM, cmland <qi...@gmail.com> wrote:
> if all the jms in DEADQ comes from one route , the way you said is
> useful,but actually all the jms comes from different routes,I want to get
> route's first endpoint uri , and then I can know which route occur
> exception and i can retry the message.
>
See the getFromEndpoint() and getFromRouteId() methods on Exchange,
which has the details you are looking for.
> 2012/2/22 Claus Ibsen-2 [via Camel] <
> ml-node+s465427n5504248h18@n5.nabble.com>
>
>> Use another route as your dead letter channel, and then in that route,
>> you can add details to the message, and then send it to the actual
>> DLQ.
>>
>> deadLetterUri="direct:myDLQ"
>>
>>
>> <route>
>> <from uri="direct:myDLQ"/>
>> <!-- add stuff to your message here -->
>> ...
>> <!-- and now send to the real dead letter queue -->
>> <to uri="WMQ:DEADQ?disableReplyTo=true"/>
>> </route>
>>
>>
>> On Wed, Feb 22, 2012 at 6:47 AM, cmland <[hidden email]<http://user/SendEmail.jtp?type=node&node=5504248&i=0>>
>> wrote:
>>
>> > my xml file like this:
>> > <camel:route errorHandlerRef="deadLetterErrorHandler" >
>> > <camel:from uri="WMQ:TestQ?disableReplyTo=true"></camel:from>
>> > <camel:transacted></camel:transacted>
>> > <camel:process ref="testProcess"></camel:process>
>> > <camel:to uri="WMQ:TestQ2?disableReplyTo=true"></camel:to>
>> > </camel:route>
>> >
>> > <camel:errorHandler id="deadLetterErrorHandler"
>> > type="DeadLetterChannel"
>> > deadLetterUri="WMQ:DEADQ?disableReplyTo=true"
>> > useOriginalMessage="true">
>> > <camel:redeliveryPolicy maximumRedeliveries="2"
>> > redeliveryDelay="100" />
>> > </camel:errorHandler>
>> > I want to put the uri "WMQ:TestQ?disableReplyTo=true" as a jms head
>> property
>> > when the message deliver to deadletter queue.Or add the uri to the
>> message
>> > body before deliver to deadletter queue.
>> > what could i do ,any suggestion?
>> >
>> > --
>> > View this message in context:
>> http://camel.465427.n5.nabble.com/I-want-to-put-extra-info-as-jms-head-property-when-the-message-deliver-to-the-deadletter-queue-tp5504201p5504201.html
>> > Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
>>
>> --
>> Claus Ibsen
>> -----------------
>> FuseSource
>> Email: [hidden email]<http://user/SendEmail.jtp?type=node&node=5504248&i=1>
>> Web: http://fusesource.com
>> Twitter: davsclaus, fusenews
>> Blog: http://davsclaus.blogspot.com/
>> Author of Camel in Action: http://www.manning.com/ibsen/
>>
>>
>> ------------------------------
>> If you reply to this email, your message will be added to the discussion
>> below:
>>
>> http://camel.465427.n5.nabble.com/I-want-to-put-extra-info-as-jms-head-property-when-the-message-deliver-to-the-deadletter-queue-tp5504203p5504248.html
>> To unsubscribe from Camel, click here<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=465427&code=cWlhbmNoZW5nLmNoQGdtYWlsLmNvbXw0NjU0Mjd8LTE2NjA2MTIxODA=>
>> .
>> NAML<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/I-want-to-put-extra-info-as-jms-head-property-when-the-message-deliver-to-the-deadletter-queue-tp5504203p5504306.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
--
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/
Re: I want to put extra info as jms head property when the message
deliver to the deadletter queue
Posted by cmland <qi...@gmail.com>.
if all the jms in DEADQ comes from one route , the way you said is
useful,but actually all the jms comes from different routes,I want to get
route's first endpoint uri , and then I can know which route occur
exception and i can retry the message.
2012/2/22 Claus Ibsen-2 [via Camel] <
ml-node+s465427n5504248h18@n5.nabble.com>
> Use another route as your dead letter channel, and then in that route,
> you can add details to the message, and then send it to the actual
> DLQ.
>
> deadLetterUri="direct:myDLQ"
>
>
> <route>
> <from uri="direct:myDLQ"/>
> <!-- add stuff to your message here -->
> ...
> <!-- and now send to the real dead letter queue -->
> <to uri="WMQ:DEADQ?disableReplyTo=true"/>
> </route>
>
>
> On Wed, Feb 22, 2012 at 6:47 AM, cmland <[hidden email]<http://user/SendEmail.jtp?type=node&node=5504248&i=0>>
> wrote:
>
> > my xml file like this:
> > <camel:route errorHandlerRef="deadLetterErrorHandler" >
> > <camel:from uri="WMQ:TestQ?disableReplyTo=true"></camel:from>
> > <camel:transacted></camel:transacted>
> > <camel:process ref="testProcess"></camel:process>
> > <camel:to uri="WMQ:TestQ2?disableReplyTo=true"></camel:to>
> > </camel:route>
> >
> > <camel:errorHandler id="deadLetterErrorHandler"
> > type="DeadLetterChannel"
> > deadLetterUri="WMQ:DEADQ?disableReplyTo=true"
> > useOriginalMessage="true">
> > <camel:redeliveryPolicy maximumRedeliveries="2"
> > redeliveryDelay="100" />
> > </camel:errorHandler>
> > I want to put the uri "WMQ:TestQ?disableReplyTo=true" as a jms head
> property
> > when the message deliver to deadletter queue.Or add the uri to the
> message
> > body before deliver to deadletter queue.
> > what could i do ,any suggestion?
> >
> > --
> > View this message in context:
> http://camel.465427.n5.nabble.com/I-want-to-put-extra-info-as-jms-head-property-when-the-message-deliver-to-the-deadletter-queue-tp5504201p5504201.html
> > Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
>
> --
> Claus Ibsen
> -----------------
> FuseSource
> Email: [hidden email]<http://user/SendEmail.jtp?type=node&node=5504248&i=1>
> Web: http://fusesource.com
> Twitter: davsclaus, fusenews
> Blog: http://davsclaus.blogspot.com/
> Author of Camel in Action: http://www.manning.com/ibsen/
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://camel.465427.n5.nabble.com/I-want-to-put-extra-info-as-jms-head-property-when-the-message-deliver-to-the-deadletter-queue-tp5504203p5504248.html
> To unsubscribe from Camel, click here<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=465427&code=cWlhbmNoZW5nLmNoQGdtYWlsLmNvbXw0NjU0Mjd8LTE2NjA2MTIxODA=>
> .
> NAML<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
--
View this message in context: http://camel.465427.n5.nabble.com/I-want-to-put-extra-info-as-jms-head-property-when-the-message-deliver-to-the-deadletter-queue-tp5504203p5504306.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: I want to put extra info as jms head property when the message
deliver to the deadletter queue
Posted by Claus Ibsen <cl...@gmail.com>.
Use another route as your dead letter channel, and then in that route,
you can add details to the message, and then send it to the actual
DLQ.
deadLetterUri="direct:myDLQ"
<route>
<from uri="direct:myDLQ"/>
<!-- add stuff to your message here -->
...
<!-- and now send to the real dead letter queue -->
<to uri="WMQ:DEADQ?disableReplyTo=true"/>
</route>
On Wed, Feb 22, 2012 at 6:47 AM, cmland <qi...@gmail.com> wrote:
> my xml file like this:
> <camel:route errorHandlerRef="deadLetterErrorHandler" >
> <camel:from uri="WMQ:TestQ?disableReplyTo=true"></camel:from>
> <camel:transacted></camel:transacted>
> <camel:process ref="testProcess"></camel:process>
> <camel:to uri="WMQ:TestQ2?disableReplyTo=true"></camel:to>
> </camel:route>
>
> <camel:errorHandler id="deadLetterErrorHandler"
> type="DeadLetterChannel"
> deadLetterUri="WMQ:DEADQ?disableReplyTo=true"
> useOriginalMessage="true">
> <camel:redeliveryPolicy maximumRedeliveries="2"
> redeliveryDelay="100" />
> </camel:errorHandler>
> I want to put the uri "WMQ:TestQ?disableReplyTo=true" as a jms head property
> when the message deliver to deadletter queue.Or add the uri to the message
> body before deliver to deadletter queue.
> what could i do ,any suggestion?
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/I-want-to-put-extra-info-as-jms-head-property-when-the-message-deliver-to-the-deadletter-queue-tp5504201p5504201.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
--
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/