camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pevgen <pev...@km.ru>
Subject Re: "deadLetterChannel" access from process()
Date Thu, 19 Jun 2008 18:59:19 GMT

Thank you, James

But, if my route like this :

from("jms:...").errorHandler(deadLetter()).process(myProcess).to("http://host1/example")

and "to"-endpoint throw an exception, then i wont repeat like
RedeliveryPolicy.

I don't wont change the route :
from("jms:...").process(myProcess) 
and create "http" -endpoint during runtime in "myProcess", but i wont to
manage redelivery schedule only.

can i do it ?

Thanks
Evgeny
 


James.Strachan wrote:
> 
> 2008/6/19 pevgen <pevgen@km.ru>:
>> Hi.
>>
>> How can I get "deadLetterChannel" object in my "Processor.process()"
>> method
>> ?
>>
>> I wont to change RedeliveryPolicy in runtime. for example, i need stop
>> increase delay time after X attempts.
> 
> You're best bet is to use dependency injection.
> 
> e.g. create a custom policy, then inject it into your custom Processor.
> 
> myCustomDeadLetterChannel = ...;
> 
> myCustomProcessor = new MyCustomProcessor(myCustomDeadLetterChannel);
> 
> from("foo").process(myCustomProcessor);
> 
> 
> Or using spring to do dependency injection if you use spring.xml instead.
> 
> -- 
> James
> -------
> http://macstrac.blogspot.com/
> 
> Open Source Integration
> http://open.iona.com
> 
> 

-- 
View this message in context: http://www.nabble.com/%22deadLetterChannel%22-access-from-process%28%29-tp18010045s22882p18015800.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message