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

Use a single shared producer #18

Merged
merged 2 commits into from
Aug 27, 2020
Merged

Conversation

simonswine
Copy link
Collaborator

This PR switches from creating and destroying a producer for every batch to a model where we share a single producer and reuse it while the adapter is running.

To clean-up opened resources we are handling signals now properly and first shutdown the HTTP server and then the Clients.

This is way more effective and limits the load necessary on the brokers.
main.go Outdated Show resolved Hide resolved
Copy link

@MichelHollands MichelHollands left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Implement a graceful shutdown of the HTTP server and the clients.
@simonswine simonswine merged commit 2950079 into master Aug 27, 2020
@simonswine simonswine mentioned this pull request Aug 27, 2020
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

Successfully merging this pull request may close these issues.

None yet

2 participants