On Fri, Oct 22, 2010 at 5:39 PM, Thiago Souza <[email protected]> wrote: > > Hi, > > So, if I can configure a redelivery policy at ActiveMQ AND at Camel, > what would be the consequences of mixing different configurations? > Is it a good practice to isolate a redelivery policy configuration in > one place only (that is, in amq OR in camel) ? >
The problem is that when using the redelivery of the AMQ broker (transaction and managed by transaction manager) is that it often doesn't provide information that this is a redelivery, or if it does, not the attempt number. So you have a hard to keep track of how many times have I tried this message before. Remember when the message is being redelivered from AMQ it can be a new thread processing it. If you have a network of brokers the redelivery of the message could potentially occur at another node etc. With JMS spec there is the JMSRedelivered flag which is just a boolean, so at least you know its a redelivery. But I dont recall it have a attempt couter. You can try to keep track of this yourself, and then handle the exception in any way you like, and then let the transaction commit. You can configure Camel error handler to use local redelivery attempts as well. So you can have Camel retry invoking (let say invoking a web service). But if it has to wait for redelivery then the thread is blocked waiting). The pro with the Camel error handler is that it only redeliveries at the point of failure. Where as AMQ redelivery is "starting all over". > Regards, > Thiago Souza > -- > View this message in context: > http://camel.465427.n5.nabble.com/Transaction-Error-Handler-with-Dead-Letter-Channel-tp3232320p3232466.html > Sent from the Camel - Users mailing list archive at Nabble.com. > -- Claus Ibsen Apache Camel Committer Author of Camel in Action: http://www.manning.com/ibsen/ Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus
