TCP transport for logstash-gelf
The TCP transport for logstash-gelf allows to configure TCP-specific options. Options are configured in a URI Query-String style:
Plaintext
tcp:hostname?readTimeout=10s&connectionTimeout=1000ms&deliveryAttempts=5&keepAlive=true
SSL
ssl:hostname?readTimeout=10s&connectionTimeout=1000ms&deliveryAttempts=5&keepAlive=true
Options
- URI scheme specifies whether to use plaintext 
tcpor SSLssl. readTimeoutSocket Read-Timeout (SO_TIMEOUT). The unit can be specified as suffix (see below). A timeout of zero is interpreted as an infinite timeout. Defaults to2s.connectionTimeoutSocket Connection-Timeout (SO_TIMEOUT). The unit can be specified as suffix (see below). A timeout of zero is interpreted as an infinite timeout. Defaults to2s.deliveryAttemptsNumber of Delivery-Attempts. Will retry to deliver the message and reconnect if necessary. A number of zero is interpreted as an infinite attempts. Defaults to1.keepAliveEnable TCP keepAlive. Defaults tofalse.writeBackoffTimeDelay between subsequent attempts to write to a socket when a backoff is activated. Backoff is activated if a socket sender buffer is full and several attempts to write to the socket are unsuccessful due to it. The unit can be specified as suffix (see below). Defaults to50ms.writeBackoffThresholdAttempts to write to a socket before a backoff will be activated. Defaults to10.maxWriteBackoffTimeMaximum time spent for awaiting during a backoff for a single message send operation. The unit can be specified as suffix (see below). Default equals toconnectionTimeout.
SSL
TCP with SSL uses the JVM's truststore settings. You can specify a truststore by configuring the location to the truststore by setting javax.net.ssl.trustStore. Make sure this system property is set before bootstrapping any SSL-related components. Once the default SSL context is initialized, changes to javax.net.ssl.trustStore are not applied.
A customized javax.net.ssl.SSLContext can be provided by implementing an own GelfSenderProvider that configures GelfTCPSSLSender.
Timeout Units
Timeout values can be specified with or without a time-unit. The time-unit is appended directly to the numeric timeout value.
A not specified time-unit defaults to MILLISECONDS
Available time-units are:
ns–NANOSECONDSus–MICROSECONDSms–MILLISECONDSs–SECONDSm–MINUTESh–HOURSd–DAYS
Examples:
2s– 2 seconds1000– 1000 milliseconds5m– 5 minutes
Buffer size
The TCP sender uses pooled buffers to reduce GC pressure. The size defaults to 811.008 bytes (99 * 8192). The size can be controlled by setting the logstash-gelf.buffer.size property (system property). Buffering is disabled if logstash-gelf.buffer.size is set to 0 (zero).
Maximum Message Size
IP packets are subject to packet fragmentation during transport unless the DF bit is set or an active network component isn't capable of fragmentation. In such cases, make sure to adjust the maximumMessageSize to your MTU size with considering a 12 bytes GELF header.
    
    