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

Consumer group ignores AutoCommit flag when it exits #1843

Closed
hipper opened this issue Nov 26, 2020 · 2 comments
Closed

Consumer group ignores AutoCommit flag when it exits #1843

hipper opened this issue Nov 26, 2020 · 2 comments
Labels
stale Issues and pull requests without any recent activity

Comments

@hipper
Copy link

hipper commented Nov 26, 2020

Versions

Please specify real version numbers or git SHAs, not just "Latest" since that changes fairly regularly.

Sarama Kafka Go
1.27.2 2.7.0 1.14
Problem Description

When consumer's AutoCommit flag is disabled by configuration and you mark offset during the process with session.MarkMessage(msg, "") it doesn't commit the offset as expected. However when you terminate the consumer (or rebalancing is triggered) it commits the offset ignoring the AutoCommit flag.

This is likely related to this PR: #1699
This PR removes the check:

// flushToBroker is ignored if auto-commit offsets is disabled
func (om *offsetManager) flushToBroker() {
	if !om.conf.Consumer.Offsets.AutoCommit.Enable {
		return
	}
        ...

I test using Sarama 1.26.4 where that check is in place and it works as expected, but 1.27.2 commits the offset on Close() which is likely a bug.

@ghost
Copy link

ghost commented Mar 16, 2021

Thank you for taking the time to raise this issue. However, it has not had any activity on it in the past 90 days and will be closed in 30 days if no updates occur.
Please check if the master branch has already resolved the issue since it was raised. If you believe the issue is still valid and you would like input from the maintainers then please comment to ask for it to be reviewed.

@ghost ghost added the stale Issues and pull requests without any recent activity label Mar 16, 2021
@dnwe
Copy link
Collaborator

dnwe commented Jan 31, 2022

Fixed by #1846

@dnwe dnwe closed this as completed Jan 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Issues and pull requests without any recent activity
Projects
None yet
Development

No branches or pull requests

2 participants