New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Spurious error “Cannot correlate response - no pending reply” using TcpOutboundGateway and CachingClientConnectionFactory [INT-3722] #7677
Comments
Russell Maytham commented I tested the code changes associated with https://github.com/spring-projects/spring-integration/pull/1452/commits |
Artem Bilan commented Great, Russell Maytham! Thank you very much for the feedback. I'm on review that PR, so the fix will be available in the |
Gary Russell commented Yes, thanks Russell Maytham for testing; very helpful. I presume you will need a release including this fix; we don't currently have 4.1.5 scheduled but can schedule it if you have a particular date by which you'll need it. Of course, you can develop/test using 4.1.5.BUILD-SNAPSHOT (once the patch is merged) but I would not recommend using a snapshot in production. |
Russell Maytham commented I have included the changes on my side, so I will wait for the normal release 4.1.5 |
Gary Russell commented Merged and cherry-picked by Artem Bilan |
Gary Russell commented Fix is incomplete; while it solves the reported problem, it can cause a memory leak (preventing reuse of a connection). |
Gary Russell commented |
Gary Russell commented Russell Maytham 4.1.5 is now available. |
Russell Maytham commented The way this was handled has vindicated my choice of technology at my workplace. |
Russell Maytham opened INT-3722 and commented
Spurious correlation errors occur when using using TcpOutboundGateway with CachingClientConnectionFactory in a multithreaded context.
Gary's explanation:
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
Stackoverflow:[ http://stackoverflow.com/questions/30459804/spurious-error-cannot-correlate-response-no-pending-reply-using-tcpoutboundg?noredirect=1#comment49001543_30459804]
Affects: 4.1.2
Reference URL: http://stackoverflow.com/questions/30459804/spurious-error-cannot-correlate-response-no-pending-reply-using-tcpoutboundg?noredirect=1#comment49001543_30459804
Attachments:
Issue Links:
Referenced from: pull request #1452
The text was updated successfully, but these errors were encountered: