You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Version Information
Version of Akka.NET? v1.5.40
Which Akka.NET Modules? Akka.Persistence.Sql
Problem Description
When running multiple persistence journals in the same Akka.NET application with Akka.Persistence.Sql, creating multiple ReadJournal instances causes actor name conflicts. This occurs when multiple projection actors (ReceivePersistentActor instances) try to create their own read journals using Context.System.ReadJournalFor<SqlReadJournal>().
Error Messages
Users encounter either of these exceptions:
Actor name "akka.persistence.query.journal.contact-query-permitter" is not unique\!
Actor name "journalakka-persistence-sql-sequence-actor" is not unique\!
Current Implementation Issues
ReadJournal is being created multiple times unnecessarily
Each ReadJournal creates its own query throttler, defeating the purpose of having a throttler in the first place
The actors are created in the /user hierarchy instead of being /system actors
Reproduction Steps
Create multiple persistence journals in the same Akka.NET application
Use these journals for data projections to various destinations (SQL, RabbitMQ, etc.)
Run multiple projector actors simultaneously
When the second projection actor reaches its OnReplaySuccess() method and calls:
Make the ReadJournal and query throttler singleton instances
Move the actors to the /system hierarchy instead of /user
Implement proper naming/scoping for these actors when multiple journals are in use
Impact
This issue affects anyone trying to run multiple projections simultaneously using Akka.Persistence.Sql, which is a common use case for data projections and event sourcing scenarios.
The text was updated successfully, but these errors were encountered:
* Add #530 Spec
* Harden unit test
* Add comment block to explain SqlReadJournalProvider.GetReadJournal()
* Make all internal actors system actors
* Fix duplicate actor name issue
Version Information
Version of Akka.NET? v1.5.40
Which Akka.NET Modules? Akka.Persistence.Sql
Problem Description
When running multiple persistence journals in the same Akka.NET application with Akka.Persistence.Sql, creating multiple ReadJournal instances causes actor name conflicts. This occurs when multiple projection actors (ReceivePersistentActor instances) try to create their own read journals using
Context.System.ReadJournalFor<SqlReadJournal>()
.Error Messages
Users encounter either of these exceptions:
Actor name "akka.persistence.query.journal.contact-query-permitter" is not unique\!
Actor name "journalakka-persistence-sql-sequence-actor" is not unique\!
Current Implementation Issues
Reproduction Steps
The exception is thrown.
Technical Details
Proposed Solutions
Impact
This issue affects anyone trying to run multiple projections simultaneously using Akka.Persistence.Sql, which is a common use case for data projections and event sourcing scenarios.
The text was updated successfully, but these errors were encountered: