Hi I have created a ticket to enhanced this in Camel https://issues.apache.org/activemq/browse/CAMEL-1234
I have also added a wiki sample with a solution. Albeit not as good as it will kick in even if the redelivery was a success as long the redelivery flag is set But it give the basic idea how to do it. http://cwiki.apache.org/confluence/display/CAMEL/Dead+Letter+Channel On Wed, Jan 7, 2009 at 11:52 AM, Claus Ibsen <claus.ib...@gmail.com> wrote: > Hi > > I am working on some samples now for this. Will get back later. > > > On Wed, Jan 7, 2009 at 6:52 AM, Willem Jiang <willem.ji...@gmail.com> wrote: >> Hi, >> >> Please see my comment in the mail. >> >> harinair wrote: >>> Hi All: >>> >>> Thanks a lot for all the help I have received. We are nearing a production >>> implementation of a Camel based messaging system! It was a great experience, >>> I learned a lot and we saved a lot of time since I used Camel. >>> >>> I now have two questions: >>> >>> 1. I use org.apache.camel.spring.Main to start my standalone Camel context. >>> Now how do I stop it? Till now I was killing it. Can I kill it? I guess it >>> may not be the right way since I have a feeling that the messages in the >>> pipeline (especially the ones that are in Retry processing) is lost. >>> >> >> If you take a look at the org.apache.camel.spring.Main, you will find >> this Main class has start and stop methods, so you could write your own >> manager class which is based on the Spring main. >> >> >>> 2. I really need to get access to the Message between each retry. I use >>> recipientList to forward message to different endpoints based on a header. I >>> have also retry rules which make the Endpoint retry a specific number of >>> times. In many cases I may have to get control and make some header >>> modification of the message before each retry. I could not find any good >>> docs on that. Is there any Strategy implementation I can use that can get >>> control of the exchange before each retry? If that is not there wouldn't it >>> be a good idea to provide a way to intercept messages before each retry? >>> >> I think you need get to know some detail of the camel ErrorHandler[1][2] >> first, then you could write your own DeadLetterChannel[3][4] to add you >> what you need to control the exchange before retrying. >> >>> Thanks in advance, >>> Hari Gangadharan >>> >> >> [1]http://activemq.apache.org/camel/error-handling-in-camel.html >> [2]http://activemq.apache.org/camel/error-handler.html >> [3]http://activemq.apache.org/camel/dead-letter-channel.html >> [4]http://svn.apache.org/repos/asf/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/DeadLetterChannel.java >> >> Willem >> >> > > > > -- > > /Claus Ibsen > Apache Camel Committer > Blog: http://davsclaus.blogspot.com/ > -- /Claus Ibsen Apache Camel Committer Blog: http://davsclaus.blogspot.com/