Is there any way to specify what type of message an actor can accept and give a compile error if anything tries to send it some other type?
While typed actors do solve the problem to some extent, you have to keep in mind that this only provides partial static type safety — you are still silently doing a dynamic cast from an untyped actor to a typed one by that typedActorOf(...)
call, and that's where the dynamicity creeps in and static correctness is lost — if the underlying ref turns out to point to an actor that does not actually obey the typed interface, you have a bug; Akka attempts no runtime verification of who's "backing" the typed ref so typed messages end up being sent to actors that can't (properly) respond to them.
All in all, to my best knowledge, the only way to go about achieving complete (?) static type safety with Akka is to use Typed Channels: http://letitcrash.com/post/45188487245/the-second-step-akka-typed-channels.