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

Kafka consumer reliability/performance improvements #117

Merged
merged 1 commit into from
Jun 7, 2024
Merged

Conversation

noggi
Copy link
Contributor

@noggi noggi commented Jun 6, 2024

  • Reliability: check/retry commit failures. By default, commit is asynchronous, and no error checking/logging is performed. This PR converts the commit call to a synchronous call, checks if any partition failed to commit, logs the errors, and retries failed commits.

  • Performance: originally, actions consumer commits offset after passing every single message to the user. Commit is very expensive by itself, and it causes a network round-trip, so processing of a heavily backed up topic may take a very long time. This changes the behavior of the consumer such that it only commits after messages that the user cares about, and all other messages are committed periodically, according to the standard auto-commit configuration.

@jjoyce0510

@noggi noggi force-pushed the ak--kafka-fixes branch from 0584a05 to abde975 Compare June 6, 2024 20:15
@acryldata acryldata deleted a comment from github-actions bot Jun 6, 2024
@noggi noggi force-pushed the ak--kafka-fixes branch from abde975 to c9b586a Compare June 6, 2024 20:24
Copy link

github-actions bot commented Jun 6, 2024

Unit Test Results (build & test)

63 tests  ±0   63 ✔️ ±0   3s ⏱️ ±0s
  1 suites ±0     0 💤 ±0 
  1 files   ±0     0 ±0 

Results for commit 3845f7e. ± Comparison against base commit 01661f0.

♻️ This comment has been updated with latest results.

@noggi noggi force-pushed the ak--kafka-fixes branch 2 times, most recently from f20c591 to 7783e75 Compare June 6, 2024 21:30
Copy link
Contributor

@jjoyce0510 jjoyce0510 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comments, but overall LGTM

@noggi noggi force-pushed the ak--kafka-fixes branch from 7783e75 to cc32334 Compare June 7, 2024 01:22
@noggi noggi force-pushed the ak--kafka-fixes branch from cc32334 to 3845f7e Compare June 7, 2024 01:42
@noggi noggi changed the title [WIP] Kafka consumer reliability/performance improvements Kafka consumer reliability/performance improvements Jun 7, 2024
@noggi noggi merged commit 54a568b into main Jun 7, 2024
3 checks passed
@noggi noggi deleted the ak--kafka-fixes branch June 7, 2024 04:57
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

Successfully merging this pull request may close these issues.

2 participants