camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james.strac...@gmail.com>
Subject Re: "deadLetterChannel" access from process()
Date Thu, 19 Jun 2008 15:55:49 GMT
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

Mime
View raw message