"Dead Letters aufgetreten" Fehlermeldung während der Ausführung von AKKA remote-Akteure

Ich versuche, remote-Akteure mit AKKA, auf meinem localhost, aber jedes mal bekomme ich diesen Fehler. Es sagt Toten Briefe gefunden. Ich suchte im internet und fand heraus, dass dieser Fehler kommt, wenn die Akteure erhalten eine Nachricht, nachdem der thread beendet ist. Also ich bin auf der Suche nach einem Weg, um die Akteure lebendig, die auf remote-Maschinen. Ich bin mit akka Akteure und nicht der scala-Akteure.

[INFO] [09/16/2013 18:44:51.426] [run-main] [Remoting] Starting remoting

[INFO] [09/16/2013 18:44:51.688] [run-main] [Remoting] Remoting started; listening on      addresses :[akka.tcp://actorSystem1@localhost:2209]

[INFO] [09/16/2013 18:44:51.759] [actorSystem2-akka.actor.default-dispatcher-5] [akka://actorSystem2/deadLetters] Message [java.lang.String] from 

Actor[akka://actorSystem2/deadLetters] to Actor[akka://actorSystem2/deadLetters] was not delivered. [1] **dead letters encountered**. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'.   

Folgende code ist der code.

import akka.actor.{Actor, Props, ActorSystem}
import com.typesafe.config.ConfigFactory
import akka.remote._

object MyApp extends App {
 val actorSystem1 = ActorSystem("actorSystem1", ConfigFactory.parseString("""
    akka {
       actor {
           provider = "akka.remote.RemoteActorRefProvider"
             }
       remote {
           transport = ["akka.remote.netty.tcp"]
       netty.tcp {
           hostname = "localhost"
           port = 2209
                 }
             }
        }
   """))


  val actorSystem2 = ActorSystem("actorSystem2")


actorSystem1.actorOf(Props(new Actor {
def receive = {
  case x: String =>
    Thread.sleep(1000)
    println("RECEIVED MESSAGE: " + x)
               } }), "simplisticActor")



    val remoteActor = actorSystem2.actorFor("akka://actorSystem1@localhost:2209/user/simplisticActor")

  remoteActor ! "TEST 1"
  remoteActor ! "TEST 2"



  Thread.sleep(1000)

  actorSystem1.shutdown()
  actorSystem2.shutdown()
 }

Vielen Dank im Voraus.

InformationsquelleAutor nitinsh99 | 2013-09-16
Schreibe einen Kommentar