Hello all,

Camel's error handling is pretty powerful, but lately I am having two
questions about it.

1) I am working a custom camel component, and not quite sure how to handle
certain error condition. I may be having wrong idea from the very beginning
but let me give you a simple scenario to describe the issue.

from("jms:someQueue").to("myCustom:endpoint");

My custom endpoint does some async message sending. For performance reason,
it should keep sending messages from the jms queue without waiting for
responses. responses come back asynchronously from the remote host. The
question here is that if a response doesn't return without a timeout period,
I would like an exception to be thrown and hence to be captured by camel's
error handling where some redelivery logic is made possible. unfortunately,
with this async nature of producing, the timeout event will be triggered in
a different thread and hence no way to have camel to capture my created
exception up to my limited camel knowledge.


2) my second question: is it possible that the error handling will happen in
multiple threads in case of multi-threaded exchange processing. for example,
the following route:

from("direct:start").thread(10).process(new Processor(){/*throw some
exception*/});

will the error handling happen in the same thread of the caller that
produces message to "direct:start", or will happen concurrently in multiple
threads?


Zhi

Reply via email to