Skip to content

TCP connection not closed when Disruptor fails to shutdown within the grace period #569

@brenuart

Description

@brenuart

The TCP connection is closed in TcpSendingEventHandler#onShutdown (see https://github.com/logstash/logstash-logback-encoder/blob/logstash-logback-encoder-6.6/src/main/java/net/logstash/logback/appender/AbstractLogstashTcpSocketAppender.java#L644-L649). This method - part of the Disruptor LifecycleAware interface - is invoked by the Disruptor when it is shutdown.

When shutdown, the Disruptor first waits during a configurable period of time until all events are processed. If some events remain in the buffer after this period is elapsed, it throws a TimeoutException and the shutdown sequence is aborted. In this scenario the onShutdown method of the TcpEventHandler is not invoked and the connection remains open.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions