2017-05-04 1 views
0

ClusterClientで簡単な文字列"Dummy string"をAkkaクラスターに送信しようとしています。設定は問題なく、フロントエンドとクラスタを接続していますが、DistributedPubSubメディエータに送信されたSendメッセージはClusterReceptionistからDeadLettersに配信されます。`ClusterReceptionist`からのメッセージが` DistributedPubSubMediator`に届きません

Sendメッセージがメディエータに送信されるようにするには、後でそのメッセージをクラスタ内から送信してください。

お手数ですが、よろしくお願いします。

フロントエンドログ:

22:51:34,645 DEBUG akka.remote.EndpointWriter - sending message RemoteMessage: [Send(user/UserServiceProxy,Dummy string,true)] to [Actor[akka.tcp://[email protected]:2552/system/receptionist#-1744655285]]<+[akka.tcp://[email protected]:2552/system/receptionist] from [Actor[akka://PvpFrontend/deadLetters]] 
22:51:34,646 DEBUG akka.serialization.Serialization(akka://PvpFrontend) - Using serializer [akka.cluster.pubsub.protobuf.DistributedPubSubMessageSerializer] for message [akka.cluster.pubsub.DistributedPubSubMediator$Send] 

クラスタログ:

22:51:34,626 DEBUG akka.remote.EndpointWriter - sending message RemoteMessage: [ActorIdentity([[email protected],Some(Actor[akka://PvpCluster/system/receptionist#-1744655285]))] to [Actor[akka.tcp://[email protected]:3000/user/cluster-client#-2107174838]]<+[akka.tcp://[email protected]:3000/user/cluster-client] from [Actor[akka://PvpCluster/deadLetters]] 
22:51:34,654 DEBUG akka.remote.EndpointWriter - received local message RemoteMessage: [Send(user/UserServiceProxy,Dummy string,true)] to [Actor[akka://PvpCluster/system/receptionist#-1744655285]]<+[akka://PvpCluster/system/receptionist] from [Actor[akka.tcp://[email protected]:3000/deadLetters]()] 
22:51:34,657 DEBUG akka.cluster.client.ClusterReceptionist$Internal$ClientResponseTunnel - started (akka.cluster.client.ClusterReceptionist$Internal$ClientResponseTunnel[email protected]) 
22:51:34,657 DEBUG akka.cluster.client.ClusterReceptionist - now supervising Actor[akka://PvpCluster/system/receptionist/akka.tcp%3A%2F%2FPvpFrontend%40localhost%3A3000%2FdeadLetters#552013204] 
22:51:34,657 INFO akka.actor.RepointableActorRef - Message [java.lang.String] from Actor[akka://PvpCluster/system/receptionist/akka.tcp%3A%2F%2FPvpFrontend%40localhost%3A3000%2FdeadLetters#552013204] to Actor[akka://PvpCluster/system/distributedPubSubMediator#-1480760039] was not delivered. [5] 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'. 
22:51:34,892 DEBUG akka.serialization.Serialization(akka://PvpCluster) - Using serializer [akka.serialization.JavaSerializer] for message [akka.remote.Ack] 
22:51:36,439 DEBUG akka.remote.EndpointWriter - received local message RemoteMessage: [Heartbeat] to [Actor[akka://PvpCluster/system/receptionist#-1744655285]]<+[akka://PvpCluster/system/receptionist] from [Actor[akka.tcp://[email protected]:3000/user/cluster-client#-2107174838]()] 
22:51:36,440 DEBUG akka.cluster.client.ClusterReceptionist - Received new contact from [akka.tcp://[email protected]:3000/user/cluster-client] 
22:51:36,440 DEBUG akka.remote.EndpointWriter - sending message RemoteMessage: [HeartbeatRsp] to [Actor[akka.tcp://[email protected]:3000/user/cluster-client#-2107174838]]<+[akka.tcp://[email protected]:3000/user/cluster-client] from [Actor[akka://PvpCluster/system/receptionist#-1744655285]] 
22:51:36,837 DEBUG akka.remote.transport.ProtocolStateActor - stopped 

答えて

0

正確にコードを見ずに確認するために、しかし、あなたは、クラスタクライアントに受信者を登録するには忘れているので、一般的に、これが起こるハードクライアントがメッセージ(競合状態)を送信したときにクラスタノード上でまだ登録が行われていないことを示します。

メッセージが受付に届いており、そのようなパスが登録されていない場合、メッセージはdeadLettersに送られます。受付へのノードの登録

この(the docsからサンプル)のように行われる:

val serviceA = system.actorOf(Props[Service], "serviceA") 
ClusterClientReceptionist(system).registerService(serviceA) 
関連する問題