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

Cluster-sharding: single listener per entity type key + Java DSL #1080

Merged
merged 3 commits into from Mar 18, 2020

Conversation

chbatey
Copy link
Member

@chbatey chbatey commented Mar 17, 2020

That way if it is loaded multiple times only one actor is created.

Also remove the method that takes in an actor system. We shouldn't allow
an extension from one system to use another system

Adds a Java API + docs

That way if it is loaded multiple times only one actor is created.

Also remove the method that takes in an actor system. We shouldn't allow
an extension from one system to use another system
Copy link
Member

@patriknw patriknw left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@ennru ennru left a comment

Choose a reason for hiding this comment

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

Some possibly contradicting comments.
LGTM.

}

public static void example() {
ActorSystem<Void> typedSystem = ActorSystem.create(Behaviors.empty(), "ClusterShardingExample");
Copy link
Member

Choose a reason for hiding this comment

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

It should just be system as in other examples.

import akka.actor.typed.scaladsl.Behaviors
import akka.actor.typed.scaladsl.adapter._
import akka.actor.{ExtendedActorSystem, Extension, ExtensionId}
import akka.actor.{ActorSystem, ClassicActorSystemProvider, ExtendedActorSystem, Extension, ExtensionId}
Copy link
Member

Choose a reason for hiding this comment

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

Use the FCQN for ActorSystem instead of importing it to make it more clear.

@ennru
Copy link
Member

ennru commented Mar 17, 2020

Travis wants you to javafmtAll.

@chbatey
Copy link
Member Author

chbatey commented Mar 18, 2020

Then I shall do what travis wants

@ennru ennru added this to the 2.0.3 milestone Mar 18, 2020
@ennru ennru changed the title Create a single rebalance listener per entity type key + Java DSL Cluster-sharding: single listener per entity type key + Java DSL Mar 18, 2020
@ennru ennru merged commit feabac8 into master Mar 18, 2020
@ennru ennru deleted the wip-chbatey-kafka-sharding-improvements branch March 18, 2020 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants