Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Last batch of events is not published to Google Pub/Sub #26

Open
palin opened this issue Dec 17, 2021 · 0 comments
Open

Last batch of events is not published to Google Pub/Sub #26

palin opened this issue Dec 17, 2021 · 0 comments

Comments

@palin
Copy link

palin commented Dec 17, 2021

Using Logstash 7.1.1

While using this plugin, me and my team discovered that a last batch of events is not published.
We retrieve data using JDBC plugin, process the data with some json filters and output jsons to Pub/Sub using this plugin.

What happens?
It looks like when a pipelines finishes, Logstash triggers a shutdown phase but that is not communicated to the plugin to send remaining events.

How to fix?
The fix I implemented was to overwrite this plugin and add a method in the main class:

def close
  @logger.info("Received shutdown command. Sending all outstanding messages!")
  stop
end

The original stop method of the plugin is not triggered by Logstash but the close is!
I hope it helps if anyone else has this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant