-
Notifications
You must be signed in to change notification settings - Fork 102
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
Allow transaction without upstream offsets #883
Allow transaction without upstream offsets #883
Conversation
This looks good to me, except that the overloaded What did you have in mind for a pull request against the 3.x branch? I wonder if we should change |
That sounds good, I'll name the class accordingly as well.
That might be tricky because |
Also reorder implementation
Unrelated to the changes in this PR, but it looks like there's nothing to stop concurrent transactional operations from interfering with each other - |
I'm not 100% certain how transactions are handled in the producer, but looking at this I'm certain you're right. I'd imagine no bug has been reported because most people probably use one producer per stream. The reminds me of the issue I reported with |
Confirmed in a test, I'll raise a PR shortly: |
I've branched off this PR with the concurrency fix, I'll raise once this is merged: janstenpickle/fs2-kafka@no-offsets-transactional-producer...janstenpickle:threadsafe-transactions |
The concurrency fix looks good - just a few things:
|
Thanks @bplommer, I'll make the changes |
Kafka supports performing transactions without sending upstream offsets. The use case for this is where one might want to atomically send multiple messages as the result of a single action that has no associated upstream messages.
I've just hacked this together so far, but if the maintainers agree with the approach I'll add tests and create a PR for the
3.x
series also.