Re: Handling splitting and error handling

2015-04-15 Thread Willem Jiang
handled(true) just tell camel to keep on processing the message as the error is 
recovered.
So I think you still need use handled(false) in your onException.

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.iteye.com (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On April 15, 2015 at 5:22:21 PM, blommish (johanblomgren1...@gmail.com) wrote:
 So well, this can be handled by using transacted() after picking up the
 message from direct:inbound, making it look like:
  
 from(direct:inbound)
 .transacted()
 .multicast().parallelProcessing().to(direct:a, direct:b);
  
 But there's another issue then.
  
 If I have
 onException(Exception.class).handled(true).useOriginalMessage().to(jms:errorQueue)
   
  
 It WILL not rollback the messages from the endpoints, for example if it
 fails to validate for message a, it will still send the message b to q3 and
 q4.
  
 But when having handled(false) it will not. But then it *will also rollback
 the message to the inbound queue* AND post it to the errorQueue?
  
  
  
 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/Handling-splitting-and-error-handling-tp5765748p5765819.html
   
 Sent from the Camel - Users mailing list archive at Nabble.com.
  



Re: Handling splitting and error handling

2015-04-15 Thread blommish
So well, this can be handled by using transacted() after picking up the
message from direct:inbound, making it look like:

from(direct:inbound)
  .transacted() 
  .multicast().parallelProcessing().to(direct:a, direct:b);

But there's another issue then. 

If I have
onException(Exception.class).handled(true).useOriginalMessage().to(jms:errorQueue)

It WILL not rollback the messages from the endpoints, for example if it
fails to validate for message a, it will still send the message b to q3 and
q4. 

But when having handled(false) it will not. But then it *will also rollback
the message to the inbound queue* AND post it to the errorQueue? 



--
View this message in context: 
http://camel.465427.n5.nabble.com/Handling-splitting-and-error-handling-tp5765748p5765819.html
Sent from the Camel - Users mailing list archive at Nabble.com.