-
Notifications
You must be signed in to change notification settings - Fork 36
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
fix: A few smaller follow ups for the edge replication #1094
Merged
Merged
Changes from 17 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
b239808
fix: A few smaller follow ups for the edge replication
johanandren 1668132
Right kind of option for Java
johanandren 1321e60
Java function type for entity ref factory
johanandren 68ba092
The right option converer
johanandren 66f1251
Mima
johanandren 311e0fd
Found some more Java API weirdness (regular Java function vs akka Jav…
johanandren 0da5120
One more alias use
johanandren e358cac
Wrong type of replication in Java API
johanandren 6e552a5
Initial consumer filter for edge replication
johanandren e191ed9
Pass initial consumer filters to producer for RES
johanandren 60026c4
Include internal replication settings when converting back and forth …
johanandren 7381a7c
More mima
johanandren 2daba9c
JavaDSL test for edge replication (failing)
johanandren a73f9e6
More adaptation/delegation but test still failing
johanandren 648e68b
more logging
johanandren 6b1d99f
with CanTriggerReplay in adapters
patriknw 6b3df47
more selective CanTriggerReplay adapter
patriknw 90430a6
Move source provider adapters to core and hide feature mixin choice i…
johanandren b462361
mima
johanandren 14b8220
Missing header
johanandren 9c6dd36
The right adapter in the right place
johanandren File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,12 +5,10 @@ | |
package akka.projection.scaladsl | ||
|
||
import java.util.concurrent.ConcurrentHashMap | ||
|
||
import scala.concurrent.ExecutionContext | ||
import scala.concurrent.Future | ||
import scala.concurrent.TimeoutException | ||
import scala.concurrent.duration.FiniteDuration | ||
|
||
import akka.Done | ||
import akka.actor.typed.ActorRef | ||
import akka.actor.typed.ActorSystem | ||
|
@@ -23,6 +21,9 @@ import akka.projection.ProjectionId | |
import akka.util.JavaDurationConverters._ | ||
import akka.util.Timeout | ||
|
||
import java.net.URLEncoder | ||
import java.nio.charset.StandardCharsets | ||
|
||
object ProjectionManagement extends ExtensionId[ProjectionManagement] { | ||
def createExtension(system: ActorSystem[_]): ProjectionManagement = new ProjectionManagement(system) | ||
|
||
|
@@ -50,7 +51,7 @@ class ProjectionManagement(system: ActorSystem[_]) extends Extension { | |
private def topic(projectionName: String): ActorRef[Topic.Command[ProjectionManagementCommand]] = { | ||
topics.computeIfAbsent(projectionName, _ => { | ||
val name = topicName(projectionName) | ||
system.systemActorOf(Topic[ProjectionManagementCommand](name), name) | ||
system.systemActorOf(Topic[ProjectionManagementCommand](name), sanitizeActorName(name)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In the sample, we want to use the location id ( |
||
}) | ||
} | ||
|
||
|
@@ -151,4 +152,7 @@ class ProjectionManagement(system: ActorSystem[_]) extends Extension { | |
} | ||
retry(() => askSetPaused()) | ||
} | ||
|
||
private def sanitizeActorName(text: String): String = | ||
URLEncoder.encode(text, StandardCharsets.UTF_8.name()) | ||
} |
This file contains 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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have two of these adapters, one here in core and then another in projection-r2dbc. Looks very similar, if not identical?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wonder if the reason we had two was that we didn't want to make the assumption that EventTimestampQuery and LoadEventQuery are always implemented. For r2dbc we know they are.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't remember, but gut feeling is that this could be simplified. Like one implementation here with an apply that chooses what mixins the adapter should have.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll give it a shot pulling those into core, adding factories there and giving them more clear names.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved/refactored/renamed in 90430a6