Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
1.1.2
-
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".