I am trying to work with typed actors version 2.6.3 and akka http version 10.1.11 while all worked fine in non typed actors , now I am getting compilation error
object Main extends App {
def createServer(implicit system: ActorSystem[IdentityCalculated]) = {
implicit val materializer = ActorMaterializer()
}
def apply(): Behavior[IdentityCalculated] = {
Behaviors.setup { context =>
val identityManager = context.spawn(IdentityManager(), "identity-manager")
implicit val timeout = Timeout(10, TimeUnit.SECONDS)
implicit val scheduler = context.system.scheduler
identityManager.tell(CalculateIdentity(context.self))
Behaviors.receiveMessage{
case IdentityCalculated(_,_,_) =>
println("got response")
Behaviors.same
}
}
}
ActorSystem(Main(), "credentials-manager")
}
what am I missing? I want to create http server when I get the message that the identity was calculated how ever i am getting compilation error in the materializer creation
Main.scala:19:50: implicit ActorRefFactory required: if outside of an Actor you need an implicit ActorSystem, inside of an actor this should be the implicit ActorContext [error] implicit val materializer = ActorMaterializer() [error] ^ [error] one error found
thanks