Affects Version/s: 4.1.2
Component/s: TCP/UDP Support
Java(TM) SE Runtime Environment (build 1.8.0_40-b26)
Spurious correlation errors occur when using using TcpOutboundGateway with CachingClientConnectionFactory in a multithreaded context.
this is a bug with the combo of the outbound gateway and caching connection factory;
The problem is that the connection is added back to the pool (and reused) before the first thread (Thread-5) removes the pending reply; he ends up removing the new pending reply (for Thread-2) instead of his own.
See attatched App.log and Test.java