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

EachMessage logic is buggy #27

Open
ThisIsMissEm opened this issue Jun 6, 2024 · 0 comments
Open

EachMessage logic is buggy #27

ThisIsMissEm opened this issue Jun 6, 2024 · 0 comments

Comments

@ThisIsMissEm
Copy link
Collaborator

It's possible within one consumer group to overwrite the offsets committed by one consumer from another due to the logic in eachMessage.

Rather than deciding in eachMessage's callbacks whether to commit, it should be a function on "did all callbacks execute successfully?" Otherwise different consumers may commit different offsets to the same topic and consumer group.

This would also simplify out code here, since we wouldn't need any promise wrapping, we can just Promise.allSettled on registered handlers, and filter to detect rejections

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

1 participant