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

Close Socket After a Gateway Remote Timeout

    Details

      Description

      Using a tcp-outbound-gateway with a shared socket (single-use="false") is not very practical when the service being invoked is long-running; this is because the socket is reserved for use by each client in turn. This is required because the packets might be fragmented as well as the fact there is no correlation data (known to the framework) in the packets.

      This is discussed at length in the reference manual, where the use of non-shared sockets or collaborating channel adapters is recommended.

      However, if someone does configure such a gateway and the soTimeout on the socket is greater than the gateway's remoteTimeout, there is a risk of a subsequent client receiving the previous client's response.

      The gateway MUST close the socket if the client times out, because the socket is dirty and cannot be reused.

      The work around is to ensure the soTimeout is less than or equal to the gateway remoteTimeout (although see INT-2860).

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                grussell Gary Russell
                Reporter:
                grussell Gary Russell
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 0.25d
                  0.25d
                  Remaining:
                  Remaining Estimate - 0.25d
                  0.25d
                  Logged:
                  Time Spent - Not Specified
                  Not Specified