Details

      Description

      INT-2483 implemented orderly shutdown of many components. There are three (known) remaining issues...

      1. Tcp Adapters are stopped hard - sockets closed. This means that any in-flight TCP request/response scenarios will fail (because the reply cannot be written).
      2. UDP adapters may cause error messages (executor threads may be interrupted).
      3. No attempt is made for orderly shutdown of messages running on external (e.g. container) threads, such as http inbound endpoints.

      Suggest adding two methods to the OrderlyShutdownCapable interface

      void beginShutdown();
      
      void endShutdown();
      

      beginShutdown() can then be used to inform endpoints such as those above (http, tcp) to not accept any more incoming requests, while leaving in-flight requests in process time to quiesce.

      endShutdown() can be called after the shutdown delay to attempt to force stop the TCP endpoints and report if http requests are still in-flight.

        Issue Links

          Activity

          Hide
          Gary Russell added a comment -

          For HTTP inbound endpoints, I suggest we implement OrderlyShutdownCapable; after beginShutdown() has been called, we should return "503 - Service Unavailable" for any new requests, while allowing existing in-flight ops to complete during the termination delay.

          Show
          Gary Russell added a comment - For HTTP inbound endpoints, I suggest we implement OrderlyShutdownCapable; after beginShutdown() has been called, we should return "503 - Service Unavailable" for any new requests, while allowing existing in-flight ops to complete during the termination delay.
          Show
          Gary Russell added a comment - Issued PR: https://github.com/SpringSource/spring-integration/pull/514

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 2d
                2d
                Remaining:
                Remaining Estimate - 0d
                0d
                Logged:
                Time Spent - 1.5d Time Not Required
                1.5d