Re: deadLetterHandleNewException(false) seems to not work as expected

2016-01-11 Thread lchdev
Hi,

But that's exactly what I found confusing: the option name
"deadLetterHandle*New*Exception" suggests that we are configuring the
behavior of the DeadLetterChannel in the case of a new exception only, while
we actually also disable the handling of the original exception...

The unit test you linked only covers the case of an exception thrown by the
original route *and* by the dead letter channel. The use case I am trying to
discuss is the following:
* deadLetterHandleNewException(false)
* original route throws an exception
* deadLetterChannel does NOT throw an exception

Expected result: no exception was thrown back
Actual result: the exception was thrown back !

Unfortunately, I could not find a Unit Test that covers this particular
scenario. Please have a look at this one instead: 
DeadLetterChannelNoNewExceptionTest.java
<http://camel.465427.n5.nabble.com/file/n5776125/DeadLetterChannelNoNewExceptionTest.java>
  





--
View this message in context: 
http://camel.465427.n5.nabble.com/deadLetterHandleNewException-false-seems-to-not-work-as-expected-tp5775138p5776125.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: deadLetterHandleNewException(false) seems to not work as expected

2016-01-10 Thread Willem Jiang
Can you share your camel route with us?


--  
Willem Jiang


Blog: http://willemjiang.blogspot.com (English)  
http://jnn.iteye.com (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On January 8, 2016 at 11:54:55 PM, lchdev (lch...@outlook.be) wrote:
> - Bump -
>  
> Still having to work around the issue. Anyone having an idea ?
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/deadLetterHandleNewException-false-seems-to-not-work-as-expected-tp5775138p5776020.html
>   
> Sent from the Camel - Users mailing list archive at Nabble.com.
>  



Re: deadLetterHandleNewException(false) seems to not work as expected

2016-01-10 Thread Claus Ibsen
Hi

This is as expected. The option deadLetterHandleNewException is only
for new errors happening while the dead letter channel is processing
the message.

Your code just routes to a log as the dead letter channel and there is
no exception thrown.

See this unit test for an example
https://github.com/apache/camel/blob/master/camel-core/src/test/java/org/apache/camel/processor/DeadLetterChannelNotHandleNewExceptionTest.java

On Wed, Dec 16, 2015 at 11:32 AM, lchdev <lch...@outlook.be> wrote:
> I am trying to use the option /deadLetterHandleNewException(false)/ in order
> to have any new Exception occurring during the dead letter processing be
> propagated back. Unfortunately, when doing so, it seems that the dead letter
> channel propagates back the original exception as well, even if the
> DeadLetterChannel succeeded. This is definitely not the behavior that I
> expected.
>
> This has been tested with Camel 2.15.3 and 2.16.1, both behave in the same
> (unexpected) way. Am I misconfiguring or misusing something ? Or is it a bug
> ? Here is a simple route (Java DSL) that is sufficient to illustrate the
> behavior:
>
>
> Sending a message to this route will trigger an Exception that will be
> propagated back to the producer, even if we can see in the logs that the
> DeadLetterChannel has successfully *handled* the exception.
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/deadLetterHandleNewException-false-seems-to-not-work-as-expected-tp5775138.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2


Re: deadLetterHandleNewException(false) seems to not work as expected

2016-01-08 Thread lchdev
- Bump -

Still having to work around the issue. Anyone having an idea ?



--
View this message in context: 
http://camel.465427.n5.nabble.com/deadLetterHandleNewException-false-seems-to-not-work-as-expected-tp5775138p5776020.html
Sent from the Camel - Users mailing list archive at Nabble.com.


deadLetterHandleNewException(false) seems to not work as expected

2015-12-16 Thread lchdev
I am trying to use the option /deadLetterHandleNewException(false)/ in order
to have any new Exception occurring during the dead letter processing be
propagated back. Unfortunately, when doing so, it seems that the dead letter
channel propagates back the original exception as well, even if the
DeadLetterChannel succeeded. This is definitely not the behavior that I
expected.

This has been tested with Camel 2.15.3 and 2.16.1, both behave in the same
(unexpected) way. Am I misconfiguring or misusing something ? Or is it a bug
? Here is a simple route (Java DSL) that is sufficient to illustrate the
behavior:


Sending a message to this route will trigger an Exception that will be
propagated back to the producer, even if we can see in the logs that the
DeadLetterChannel has successfully *handled* the exception.




--
View this message in context: 
http://camel.465427.n5.nabble.com/deadLetterHandleNewException-false-seems-to-not-work-as-expected-tp5775138.html
Sent from the Camel - Users mailing list archive at Nabble.com.