Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-23182

Connection leak in RMQSource

    XMLWordPrintableJSON

Details

    Description

      The RabbitMQ connection is not closed properly in the RMQSource connector in case of failures. This leads to a connection leak (we loose handles to still opened connections) that will last until the Flink TaskManager is either stopped or crashes.

      The issue is caused by improper resource releasing in open and close methods of RMQSource:

      In both cases, the solution is relatively simple - make sure that the connection#close is always called if it should be (failing to close one resource should not prevent other close methods from being called). In open we probably can silently close allocated resources (as the process did not succeed eventually anyway). In close, we should either throw the first caught exception or the last one, and log all the others as warnings.

      Attachments

        Issue Links

          Activity

            People

              cmick Michał Ciesielczyk
              cmick Michał Ciesielczyk
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: