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

Flush on terminate event #9

Open
doranych opened this issue Mar 10, 2020 · 3 comments · May be fixed by #71
Open

Flush on terminate event #9

doranych opened this issue Mar 10, 2020 · 3 comments · May be fixed by #71
Labels
enhancement New feature or request

Comments

@doranych
Copy link

I think, that we could wait too much, if kafka cluster is lagging.

Imagine, you have to sent 10 events to kafka. Each one will wait max 10s.
In case of max waiting per message, you will get 100 sec await per process.

Sounds crazy.

What do you think about subscription on kernel.teminate event to flush?

We can call flush in cycle, to prevent message loss. In worst case process will wait 10 seconds, because of rdkafka batch collection.

@KonstantinCodes KonstantinCodes added the enhancement New feature or request label May 6, 2020
@rdotter
Copy link

rdotter commented May 7, 2020

@doranych it could even be that the kafka message is sent via an async message, like first SQS and after that Kafka so a retry mechanism is in place. This will also prevent the wait in the interface for 10 seconds. So then the current implementation is just fine.

So it would be nice if this enhancement is been made, it should be customizable when the flush occures.

@doranych
Copy link
Author

doranych commented May 7, 2020 via email

@tifabien tifabien linked a pull request Oct 6, 2022 that will close this issue
@tifabien
Copy link

tifabien commented Oct 6, 2022

@KonstantinCodes @rdotter
You can have a look at my PR just created. It implements what you proposed in this ticket (flush on terminate or flush message per message).

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

Successfully merging a pull request may close this issue.

4 participants