Kafka cluster sharding support with external sharding allocation#1067
Merged
seglo merged 20 commits intoakka:masterfrom Mar 6, 2020
Merged
Kafka cluster sharding support with external sharding allocation#1067seglo merged 20 commits intoakka:masterfrom
seglo merged 20 commits intoakka:masterfrom
Conversation
seglo
commented
Feb 26, 2020
seglo
commented
Feb 26, 2020
8475823 to
af96d52
Compare
9b12b37 to
5879eaa
Compare
seglo
commented
Mar 3, 2020
ennru
reviewed
Mar 5, 2020
Contributor
ennru
left a comment
There was a problem hiding this comment.
Looking forward to the docs, how should they integrate the Akka Sample?
clustersharding/src/main/scala/akka/kafka/KafkaClusterSharding.scala
Outdated
Show resolved
Hide resolved
clustersharding/src/main/scala/akka/kafka/KafkaClusterSharding.scala
Outdated
Show resolved
Hide resolved
clustersharding/src/main/scala/akka/kafka/KafkaClusterSharding.scala
Outdated
Show resolved
Hide resolved
chbatey
reviewed
Mar 5, 2020
Contributor
chbatey
left a comment
There was a problem hiding this comment.
Looks good. My only comment is regarding APIs that combine classic and typed akka
clustersharding/src/main/scala/akka/kafka/KafkaClusterSharding.scala
Outdated
Show resolved
Hide resolved
clustersharding/src/main/scala/akka/kafka/KafkaClusterSharding.scala
Outdated
Show resolved
Hide resolved
clustersharding/src/main/scala/akka/kafka/KafkaClusterSharding.scala
Outdated
Show resolved
Hide resolved
clustersharding/src/main/scala/akka/kafka/KafkaClusterSharding.scala
Outdated
Show resolved
Hide resolved
clustersharding/src/main/scala/akka/kafka/KafkaClusterSharding.scala
Outdated
Show resolved
Hide resolved
chbatey
reviewed
Mar 6, 2020
cluster-sharding/src/main/scala/akka/kafka/cluster/sharding/KafkaClusterSharding.scala
Outdated
Show resolved
Hide resolved
ennru
approved these changes
Mar 6, 2020
da7d3eb to
458b41f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Provides several convenience setup functions to use a Kafka consumer group aware Akka cluster external sharding allocation strategy. What this means in simple terms is that Akka cluster entity shards will be co-located on akka cluster nodes with a Kafka Consumer's assigned partitions.
Fixes: #1074
Features
ShardingMessageExtractorfor enveloped or non-enveloped entities.ShardingMessageExtractorcreate given a topic.ShardingMessageExtractor.KafkaProducerDefaultPartitioneruses to make sure consumed messages are routed to the correct entity.For a sample usage see this WIP Akka Samples PR akka/akka-samples#192
TODO