Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-14737

Spring-boot closes datasource before the last inflight messages are processed

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0.1, 3.1.0
    • Fix Version/s: 3.3.0
    • Labels:
      None
    • Environment:

      Windows 10 x64

      adopt open jdk 11

      spring-boot 2.2.5-RELEASE

      postgresql 12

    • Estimated Complexity:
      Unknown

      Description

      As reported on Stack Overflow (https://stackoverflow.com/questions/60654265/springboot-camel-datasource-already-closed-on-graceful-shutdown)

      I created a simple spring-boot application that fetches logs (camel-ftp) extract some data line by line and insert them in a database (camel-sql).
      When I stop the application (gracefully) spring shortly closes the datasource but there is still an inflight exchange and I get "datasource already closed" errors.

       

      I was looking for a way to tell spring to not close the datasource until all inflight exchanges are processed (or timed out ?)

        Attachments

          Activity

            People

            • Assignee:
              davsclaus Claus Ibsen
              Reporter:
              ngmip Nicolas Gillet
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: