Producer template error handling

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Producer template error handling

kiranreddykasa
Hi

I would like to know how to do error handling with producer template.

I'm sending a message to activemq endpoint using 'requestBody' of producer template.

Suppose if there is requestTimeout in activemq how can I catch that exception and build response??  
Regards

kiran Reddy
Reply | Threaded
Open this post in threaded view
|

Re: Producer template error handling

Claus Ibsen-2
When you use producer template with InOut (eg requestBody) then the
template will wait for a reply message to come back from the "other
end".

And are you asking how to handle if that response does not come back
in time, and a timeout was triggered due requestTimeout?

The producer template is just like any Java api, it throws an
exception if something goes wrong.



On Fri, Nov 22, 2013 at 10:29 AM, kiranreddykasa <[hidden email]> wrote:

> Hi
>
> I would like to know how to do error handling with producer template.
>
> I'm sending a message to activemq endpoint using 'requestBody' of producer
> template.
>
> Suppose if there is requestTimeout in activemq how can I catch that
> exception and build response??
>
>
>
> -----
> Regards
>
> kiran Reddy
> --
> View this message in context: http://camel.465427.n5.nabble.com/Producer-template-error-handling-tp5743684.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



--
Claus Ibsen
-----------------
Red Hat, Inc.
Email: [hidden email]
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
Reply | Threaded
Open this post in threaded view
|

Re: Producer template error handling

kiranreddykasa
Hi

Ya I was asking about timeout.

Thanks
Regards

kiran Reddy