Graylog2 / gelfclient

GELF client library for Java based on Netty 4
https://www.graylog.org/
Apache License 2.0
38 stars 19 forks source link

Flush queued messages before shutting down #43

Closed danotorrey closed 5 years ago

danotorrey commented 5 years ago

Resolves #42.

This change adds a GelfTransport.flushAndStop() method which blocks and waits for all messages to flush (send) before allowing shutdown to continue.

Closes https://github.com/Graylog2/graylog-s3-lambda/issues/2

coveralls commented 5 years ago

Coverage Status

Coverage decreased (-3.2%) to 79.346% when pulling bd56b517134deaf1ee4b2ba2fe35a58c44bdfe76 on flush-messages-before-shutdown into 87cf261e81addaf4e8c93f75020def0c32f9e69f on master.

danotorrey commented 5 years ago

@bernd I want to do some smoke testing on this latest version before merging. I'll report back when done.

danotorrey commented 5 years ago

@bernd My testing was successful.

danotorrey commented 5 years ago

The Travis builds were failing due to Travis upgrading all build environments to xenial that don't specify a dist explicitly (https://blog.travis-ci.com/2019-04-15-xenial-default-build-environment), which does not support JDK8 Oracle JDKs. I've explicitly specified dist: trusty in https://github.com/Graylog2/gelfclient/pull/43/commits/bd56b517134deaf1ee4b2ba2fe35a58c44bdfe76. Travis builds pass now.

See: https://travis-ci.community/t/java-9-build-failing-with-https-certificate-exception/4364/2