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

AbstractSocketAppender loses event for every socket connection break

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.1.2
    • Fix Version/s: None
    • Component/s: logback-core
    • Labels:
      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

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

              Dates

              • Created:
                Updated: