Uploaded image for project: 'logback'
  1. logback
  2. LOGBACK-977

AbstractSocketAppender loses event for every socket connection break

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 1.1.2
    • logback-core
    • None

    Description

      Problem
      The AbstractSocketAppender takes events from its queue without knowing if it can actually deliver them. In case the socket connection breaks the next write operation on the OutputStream will fail with an IOException and the event will never be delivered.

      Solution
      Change queue consumer strategy from "take" to "peek/remove". This allows to keep the event in the queue until it's transmission was successful. This will require to move away from the SynchronousQueue (queueSize == 0) logic and use the ArrayBlockingQueue with a size of 1 to implement a "synchronous queue".

      Attachments

        Activity

          People

            logback-dev Logback dev list
            sierragolf Sebastian Gröbler
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: