Skip to content

How would I use Persistence ReadJournal from the current running actor system #7188

Discussion options

You must be logged in to vote

This worked for me. The actor props is taking in a IAllEventsQuery journal which is provider agnostic

builder
            .WithInMemoryJournal()
            .WithInMemorySnapshotStore()
            .StartActors((system, registry) =>
            {

                var journalProvider = new InMemoryReadJournalProvider(
                    system.AsInstanceOf<ExtendedActorSystem>(),
                    InMemoryReadJournal.DefaultConfiguration().GetConfig("akka.persistence.query.journal.inmem")
                );

                var journal = journalProvider.GetReadJournal() as InMemoryReadJournal;
                
                var messageRouter = system.ActorOf(MessageRouter.GetProps());…

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@andre-steenbergen
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by andre-steenbergen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants