You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
INT-3459: Log exceptions in case of failOver (#2790)
* INT-3459: Log exceptions in case of failOver
JIRA: https://jira.spring.io/browse/INT-3459
When `UnicastingDispatcher` is configured with `failOver` (true by default),
it loses exceptions it caught with previous handler when the next one
processes message properly
* Add INFO logging for exceptions which are caught before going to fail
over to the next handler
* * Address PR comments
* * More PR comments
* Add a note about this logging into the `channel.adoc`
Copy file name to clipboardExpand all lines: spring-integration-core/src/main/java/org/springframework/integration/dispatcher/UnicastingDispatcher.java
+40-19Lines changed: 40 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
/*
2
-
* Copyright 2002-2018 the original author or authors.
2
+
* Copyright 2002-2019 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
Copy file name to clipboardExpand all lines: spring-integration-core/src/test/java/org/springframework/integration/dispatcher/RoundRobinDispatcherTests.java
Copy file name to clipboardExpand all lines: src/reference/asciidoc/channel.adoc
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -175,7 +175,7 @@ However, since version 3.0, you can provide your own implementation of the `Load
175
175
Note that the `load-balancer` and `load-balancer-ref` attributes are mutually exclusive.
176
176
177
177
The load-balancing also works in conjunction with a boolean `failover` property.
178
-
If the "`failover`" value is true (the default), the dispatcher falls back to any subsequent handlers (as necessary) when preceding handlers throw exceptions.
178
+
If the `failover` value is true (the default), the dispatcher falls back to any subsequent handlers (as necessary) when preceding handlers throw exceptions.
179
179
The order is determined by an optional order value defined on the handlers themselves or, if no such value exists, the order in which the handlers subscribed.
180
180
181
181
If a certain situation requires that the dispatcher always try to invoke the first handler and then fall back in the same fixed order sequence every time an error occurs, no load-balancing strategy should be provided.
@@ -187,6 +187,8 @@ When using the namespace support, the `order` attribute on any endpoint determin
187
187
NOTE: Keep in mind that load-balancing and `failover` apply only when a channel has more than one subscribed message handler.
188
188
When using the namespace support, this means that more than one endpoint shares the same channel reference defined in the `input-channel` attribute.
189
189
190
+
Starting with version 5.2, when `failover` is true, a failure of the current handler together with the failed message is logged under `debug` or `info` if configured respectively.
0 commit comments