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

Introduce setting for committing without backpressure #883

Merged
merged 11 commits into from
Sep 5, 2019

Conversation

ennru
Copy link
Member

@ennru ennru commented Sep 2, 2019

Purpose

Explore an API to send commits to Kafka without waiting for an acknowledgement.

This PR is an alternative to #874. This alternative uses a new flag in CommitterSettings to enable committing without backpressure on the existing Committer flows.

References

#874 offers different factory methods to use committing without backpressure.
See #845

Changes

  • Add CommitterSettings.delivery (CommitDelivery)
  • Add internal CommitWithoutReply message
  • Add internal CommittableBatch.commitAndForget

Unrelated:

  • The Raw Kafka benchmarks now commit to the correct partition.

Background Context

It is not obvious why one would backpressure reading from a consumer when commits are not acknowledged by Kafka at the same rate. This new API opens for a new way of committing without waiting for the commit to get a reply from the Kafka broker.

@ennru
Copy link
Member Author

ennru commented Sep 2, 2019

This is the difference between this PR and #874:

ennru/alpakka-kafka@ennru:commit-and-forget...ennru:commit-and-forget-settings

@ennru ennru force-pushed the commit-and-forget-settings branch from 8542663 to dde68c2 Compare September 2, 2019 11:55
Copy link
Contributor

@seglo seglo left a comment

Choose a reason for hiding this comment

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

LGTM 👍

core/src/main/scala/akka/kafka/CommitterSettings.scala Outdated Show resolved Hide resolved
@ennru ennru added this to the 1.1.0-RC1 milestone Sep 3, 2019
@ennru
Copy link
Member Author

ennru commented Sep 3, 2019

I opened #882 as follow up to decide about this new feature's future, once it is merged.

@@ -0,0 +1,3 @@
# PR #883 Committing without backpressure
# https://github.com/akka/alpakka-kafka/pull/883
ProblemFilters.exclude[DirectMissingMethodProblem]("akka.kafka.CommitterSettings.this")
Copy link
Contributor

Choose a reason for hiding this comment

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

The mima exclusion files can be merged to one.

Copy link
Contributor

@2m 2m left a comment

Choose a reason for hiding this comment

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

LGTM!

@ennru ennru force-pushed the commit-and-forget-settings branch from c2b1a77 to 5382e56 Compare September 5, 2019 07:19
@ennru ennru merged commit e1e398c into akka:master Sep 5, 2019
@ennru ennru deleted the commit-and-forget-settings branch September 5, 2019 07:30
@ennru ennru changed the title Introduce API for committing without backpressure (Alternative 2) Introduce setting for committing without backpressure Sep 5, 2019
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.

3 participants