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

  





--
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-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.


Re: Camel / SpringBoot integration - Invalid shutdown sequence

2015-12-17 Thread lchdev
Done !  CAMEL-9431   



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-SpringBoot-integration-Invalid-shutdown-sequence-tp5775220p5775223.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Camel / SpringBoot integration - Invalid shutdown sequence

2015-12-17 Thread lchdev
I ran into the following problem when using autoconfiguration provided by
/camel-spring-boot/ artifact. By default, there is a configuration classes
that automatically registers a /TypeConverter/ bean into the Spring context:


The returned bean is an instance of /DefaultTypeConverter/, which in turn
implements /ServiceSupport/ and its method /public void shutdown()/. This
method is infered as a /destroy-method/ by Spring, and called during the
shutdown of the ApplicationContext.

As a consequence, the TypeConverter will be destroyed *before* the
CamelContext, effectively preventing any type conversion support for the
inflight messages that have still to be processed during the graceful
shutdown period of Camel.

I have attached a JUnit test case to illustrate this behavior. AFAIK the
simple fix would be to disable the destroy-method inference:
/@Bean(destroyMethod="")/. As a workaround I had to disable type conversion
support using the property 

CamelSpringBootShutdownTest.java

  

Lch



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-SpringBoot-integration-Invalid-shutdown-sequence-tp5775220.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.