Akka and actor usecase

I know Akka can create a lot of Actor, each platform thread can handle a lot Actor, so is Actor equal Object in Java ? When will Actor die ? What happen if we have a lot of Actor, cause to OutOfMemory ?
Does Akka is a solution for Race conditions, Producer-Consumer problem ?
Thank you so much

An actor is similar to an object, in that it encapsulates state (and since everything that’s not a primitive on the JVM is an object an actor is ultimately represented by an object). An actor “lives” forever until it fails (e.g. throws an uncaught exception while processing a message) or is explicitly stopped (i.e. there is no automatic lifecycle management or garbage collection).

It is possible, given enough actors holding onto enough state, to have an OutOfMemoryError. Since the overhead of an Akka actor is in the hundreds of bytes on most JVMs, actors carrying a lot of state around is the most typical cause of OOM in an Akka application.

Because actors encapsulate their execution by only processing one message at a time, categories of race conditions, especially those involving interleaved mutations, can be prevented. Data races involving state inside an actor and state not in an actor or in another actor can still occur, though the message ordering guarantees can lead to solutions in that regard as well.

For producer-consumer problems, there are some well-defined patterns for solving these with actors. In fact, the patterns are so well-defined that Akka Streams implements those patterns in terms of actors, so that one would typically reach for Akka Streams when solving those.