10000 Configuring persistence plugins at runtime for EventSourcedBehavior by ptrdom · Pull Request #32601 · akka/akka · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
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

Configuring persistence plugins at runtime for EventSourcedBehavior #32601

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ptrdom
Copy link
Contributor
@ptrdom ptrdom commented Nov 7, 2024

@ptrdom ptrdom force-pushed the typed-persistence-runtime-journal-config branch from 2b5cbd1 to f98e8c4 Compare November 7, 2024 21:11
val journal: ClassicActorRef = persistence.journalFor(settings.journalPluginId)
val snapshotStore: ClassicActorRef = persistence.snapshotStoreFor(settings.snapshotPluginId)
val journal: ClassicActorRef =
persistence.journalFor(settings.journalPluginId, settings.journalPluginConfig.getOrElse(ConfigFactory.empty))
Copy link
Member

Choose a reason for hiding this comment

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

Thanks for this PR, I agree that it would be a nice feature. Before merging I would like to see that we can support it all the way in the r2dbc plugin, which currently isn't using that config. I recall we had problems and gave up in the Cassandra plugin akka/akka-persistence-cassandra#694

It's not only about the journal and snapshot. It should work with the queries too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Here is the PR for Pekko I was planning to port to Akka too - apache/pekko-projection#225. The r2dbc plugin would just piggyback off that, IIUC. Is this fine?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Aha, I think I finally understood what you had in mind with potential issues - my comment about projections was not relevant for that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My initial thinking is that journal plugin should simply not use the query plugin - the code doing the replay could be shared between journal and query plugins without the need for the former to depend on latter. @patriknw Does that make sense?

@patriknw
Copy link
Member
patriknw commented Nov 9, 2024

Refs #26594
Refs #31441

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
0