On Fri, 2015-09-11 at 11:02 +0200, Brice Figureau wrote:
> Hi all,
> 
> In previous Akka (2.3 or the 2.4-Mx), we could call
> 
> Persistence(system).journalFor(....)
> and
> Persistence(system).snapshotFor(....)
> 
> to get back the various ActorRef.
> 
> Admittely it wasn't very useful in a normal scenario, but when testing
> it allowed to 'mock' the journals and control the journal outside of
> Akka.
> 
> For instance, I have an in-memory journal and snapshot store that I use
> for integration tests. I can then in the test ask those actors for what
> they were asked to persist to check that the correct things were
> persisted. I can also flush the journal content between each tests.
> 
> I couldn't find a way to get back the ActorRef for the journals/snapshot
> stores, since those methods are now private to Akka.
> 
> Is there a way I can do the same thing?

It turns out that Akka creates the journals just below `/system` (at
least now), so it is just a matter of identifying the
`/system/<configpath>` actor selection and send my own message back to
my journal.

-- 
Brice Figureau <brice...@daysofwonder.com>

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to