-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Consumer group support for manually comitting offsets #1699
Conversation
I'm just a user but how are you going to return errors? |
In the same manner as how it's now being done in the 'mainLoop' when AutoCommit.Enable is true. |
Hi @wclaeys, your CLA check is failing because your commits aren't associated with your Github account. You need to connect your email address with your github account per https://help.github.com/en/github/setting-up-and-managing-your-github-user-account/adding-an-email-address-to-your-github-account. |
@BPScott , thank you for your message. I've updated my profile. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! 🚀
Could you please add some test for this!
Is this OK ? |
Hi guys, how is this pr going now? |
fixed yet? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just some small comments.
Thanks
this looks LGTM, but I'd love to have another 👍 from another Sarama maintainer @bai @dnwe @varun06 @mimaison @edoardocomar |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this PR @wclaeys — the changes overall look good to me, a couple of thoughts below:
Can somebody please cancel this new CLA check? Accidentally pushed without a proper e-mail setting (reverted it and did a proper commit). @BPScott maybe? Thank you! |
@wclaeys I think the PR is ready, so why don’t you squash your commits now and force push again with your correct email, that should pass the CLA check |
@wclaeys you need to rebase your branch on master to get the checks to pass
|
- expose a `Commit()` sync method on ConsumerGroupSession - don't create mainLoop in OffsetManager unless AutoCommit is enabled
0cba20c
to
cb9d1e8
Compare
@wclaeys ah don't worry, I found that I had permission to push to your branch myself so I performed the rebase. If the checks both pass green then I will go ahead and merge. Thanks for your contribution on this one, really appreciated 👍 |
As there's been a lot of interest in this functionality, it would be great if all the people watching this PR and the accompanying issues could test it out with their application code once it's merged, in advance of us cutting any new release version. Assuming you're using go modules to manage your dependencies, once this has merged, you can update your go.mod to fetch the latest commit from the default branch by doing:
|
How about a single consumer? Could a single consumer commit offsets manually? |
@dnwe Is there any timeline for releasing this feature? |
Please suggest when are you releasing this, this helpful in cases where you want the commit to happen instantly, systems which care about order and duplicates really need it. |
doesn't this break backwards compatibility with the addition of the new interface method? |
@jameshalsall yup I think we could apply this trick if we don't want users to implement the interface // A private method to prevent users implementing the
// interface and so future additions to it will not
// violate Go 1 compatibility.
private() from https://blog.golang.org/module-compatibility what do you think @dnwe ? ] this PR was also merged adding a new method to an existing interface #1781 |
We implement this interface in our tests so we can use mock versions in our handlers, I’m not sure preventing people from implementing it is the right option from my perspective.
…Sent from my iPhone
On 19 Aug 2020, at 16:36, Diego Alvarez ***@***.***> wrote:
@jameshalsall yup
I think we could apply this trick if we don't want users to implement directly the interface
// A private method to prevent users implementing the
// interface and so future additions to it will not
// violate Go 1 compatibility.
private()
from https://blog.golang.org/module-compatibility
what do you think @dnwe ?
this PR was also merged adding a new method to an existing interface #1781
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Provide manual Commit method and don't create mainloop if AutoCommit is disabled
Fixes #1570