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

TransactionalProducer to allow uninterruptible after commit effect #570

Closed
domartynov opened this issue Jan 3, 2023 · 1 comment
Closed

Comments

@domartynov
Copy link

With current API, it's not clear how to implement graceful shutdown of an application where e.g. a published state needs to be committed to DB after a successful commit to Kafka without interruption.

@erikvanoosten
Copy link
Collaborator

Committing offsets to a database and to Kafka is not recommended as it can cause consistency issues.

For example, when committing first to Kafka, and then to the database, it is possible that the database commit is lost. The next consumer however will not pick up these records again because they are already committed.
When committing first to the database and then to Kafka, it is possible that the Kafka commit is lost. This means that records can be processed twice. This might be fine but at-least-once is already possible without transactional commits.

In the forthcoming zio-kafka 3.0 release using transactional producer is much improved. It includes documentation that describes how to complete the transaction while the application is shutting down (see changes in #1432).

@erikvanoosten erikvanoosten closed this as not planned Won't fix, can't repro, duplicate, stale Jan 22, 2025
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

2 participants