Skip to content
This repository has been archived by the owner on Jul 25, 2024. It is now read-only.

How to support typed ActorSystem ? #53

Open
la-urre opened this issue Apr 25, 2020 · 4 comments
Open

How to support typed ActorSystem ? #53

la-urre opened this issue Apr 25, 2020 · 4 comments

Comments

@la-urre
Copy link

la-urre commented Apr 25, 2020

Hello everybody,

I started a new project and wanted to use the read journal provided in this library. I use the typed version of Akka. Unfortunately when I try to use the read journal, I get the following error:

java.lang.UnsupportedOperationException: cannot create top-level actor [eventstore-connection] from the outside on ActorSystem with custom user guardian at akka.actor.ActorSystemImpl.actorOf(ActorSystem.scala:900) at eventstore.akka.EventStoreExtension.actor$lzycompute(EventStoreExtension.scala:11) at eventstore.akka.EventStoreExtension.actor(EventStoreExtension.scala:11) at eventstore.akka.EventStoreExtension.connection$lzycompute(EventStoreExtension.scala:12) at eventstore.akka.EventStoreExtension.connection(EventStoreExtension.scala:12) at akka.persistence.eventstore.query.scaladsl.EventStoreReadJournal.connection(EventStoreReadJournal.scala:112) at akka.persistence.eventstore.query.scaladsl.EventStoreReadJournal.eventsByPersistenceId$1(EventStoreReadJournal.scala:82) at akka.persistence.eventstore.query.scaladsl.EventStoreReadJournal.eventsByPersistenceId(EventStoreReadJournal.scala:99) at akka.persistence.eventstore.query.scaladsl.EventStoreReadJournal.eventsByPersistenceId(EventStoreReadJournal.scala:38)

Is there a way for me to make this work ? Would it be complicated to migrate this library to typed ?

@guiwoda
Copy link

guiwoda commented Jan 19, 2022

I just stumbled upon the same problem. It seems it's still not fixed in v8.0.0

@ahjohannessen
Copy link
Contributor

I have not looked into this, as I have not had the need for this. I guess the best path forward is a pull request.

@guiwoda
Copy link

guiwoda commented Jan 20, 2022

@ahjohannessen it has to do with how the EsConnection creates the connection actor. I'm not familiar with the classic actor implementation, so I wouldn't know how to conserve backwards compatibility. But I understand using systemActorOf should make it work for typed actors.

@ahjohannessen
Copy link
Contributor

@guiwoda I am happy to help you out, but I do not have much cycles for this project. You could always reach out to akka developers and ask for pointers with regards to supporting both classic and typed actor system.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants