Uploaded image for project: 'Spring Integration'
  1. Spring Integration
  2. INT-3722

Spurious error “Cannot correlate response - no pending reply” using TcpOutboundGateway and CachingClientConnectionFactory

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 4.1.2
    • Fix Version/s: 4.2 M1, 4.1.5
    • Component/s: TCP/UDP Support
    • Labels:
    • Environment:
      Windows 7
      Java(TM) SE Runtime Environment (build 1.8.0_40-b26)

      Description

      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]

        Attachments

        1. App.log
          897 kB
        2. Test.java
          7 kB

          Issue Links

            Activity

              People

              Assignee:
              grussell Gary Russell
              Reporter:
              Russell Maytham Russell Maytham
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: