Commit Graph

4 Commits

Author SHA1 Message Date
Gary Russell
aad050ba47 AMQP-334 Fix Nested Cause Classification
Consider Foo caused by Bar caused by Baz.

If Bar is categorized TRUE and Baz categorized FALSE, classiy() should
return TRUE (hit on Bar), but it returned FALSE.

The early exit from the cause traversal was not taken because we
were always testing against the top level throwable (Bar).

Add a test to verify this scenario; test against the cause on
each iteration through the loop.
2013-10-02 11:21:22 -04:00
Gary Russell
6396f11878 AMQP-334 Support Unwrapping Exceptions for Retry
With Spring AMQP, the exception thrown to the
RetryTemplate is a ListenerExecutionFailedException
with the business exception in the cause. This means
Exception categorization does not work.

Provide a retry policy/classifier that can examine
exception causes until a match is found.

If so configured, the retry policy should categorize
exceptions by traversing the cause if the current
exception is not itself categorized.
2013-09-28 09:21:48 -04:00
Dave Syer
d9ee15606e Remove JUnit TestCase references 2013-04-05 14:35:06 +01:00
Dave Syer
9dd0346f31 Add test cases and re-org packages 2010-12-21 17:57:32 +00:00