INT-3146 backport

https://github.com/spring-projects/spring-integration/pull/894