Send null message to cluster receptionist

57 views
Skip to first unread message

prateek singhal

unread,
Jun 16, 2017, 10:47:03 AM6/16/17
to Akka User List
Hi,

I am getting following exception when I send null message to cluster receptionist.

final ActorRef actor = system.actorOf(ClusterClient.props(ClusterClientSettings.create(system)), "client");
actor.tell(new ClusterClient.Send("/user/worker", null), ActorRef.noSender());

Moreover any further (non-null) messages send to cluster will pass to dead-letters.
actor.tell(new ClusterClient.Send("/user/worker", "non-null message"), ActorRef.noSender());

Please help me in preventing the same?

Thanks in advance.

Exception:
[info] [ERROR] [06/14/2017 21:55:18.433] [ClusterSystem-akka.actor.default-dispatcher-3] [akka://ClusterSystem/system/distributedPubSubMediator] null
[info] scala.MatchError: null
[info]  at akka.cluster.pubsub.DistributedPubSubMediator$Internal$$anonfun$wrapIfNeeded$1.apply(DistributedPubSubMediator.scala:400)
[info]  at akka.cluster.pubsub.DistributedPubSubMediator$$anonfun$receive$1.applyOrElse(DistributedPubSubMediator.scala:550)
[info]  at akka.actor.Actor$class.aroundReceive(Actor.scala:497)
[info]  at akka.cluster.pubsub.DistributedPubSubMediator.aroundReceive(DistributedPubSubMediator.scala:479)
[info]  at akka.actor.ActorCell.receiveMessage(ActorCell.scala:526)
[info]  at akka.actor.ActorCell.invoke(ActorCell.scala:495)
[info]  at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:257)
[info]  at akka.dispatch.Mailbox.run(Mailbox.scala:224)
[info]  at akka.dispatch.Mailbox.exec(Mailbox.scala:234)
[info]  at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
[info]  at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
[info]  at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
[info]  at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
[info]
[info] [INFO] [06/14/2017 21:55:28.418] [ClusterSystem-akka.actor.default-dispatcher-2] [akka://ClusterSystem/system/distributedPubSubMediator] Message [java.lang.String] from Actor[akka://ClusterSystem/system/receptionist/akka.tcp%3A%2F%2FClusterClientSystem%40127.0.0.1%3A57123%2FdeadLetters#1581143769] to Actor[akka://Cluste
rSystem/system/distributedPubSubMediator#1686240614] was not delivered. [6] 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'.

Konrad “ktoso” Malawski

unread,
Jun 17, 2017, 1:25:15 AM6/17/17
to akka...@googlegroups.com, prateek singhal
Why are you sending null messages? That’s illegal - end of topic on that point.
Regarding the other one - no idea without you providing more details what your system actually is.

— Konrad
--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+...@googlegroups.com.
To post to this group, send email to akka...@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Patrik Nordwall

unread,
Jun 22, 2017, 9:44:24 AM6/22/17
to akka...@googlegroups.com
Sending a null message will not work, but we can avoid that match error. I created an issue https://github.com/akka/akka/issues/23215

/Patrik

To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscribe@googlegroups.com.

To post to this group, send email to akka...@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscribe@googlegroups.com.

To post to this group, send email to akka...@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.



--

Patrik Nordwall
Akka Tech Lead
Lightbend -  Reactive apps on the JVM
Twitter: @patriknw

Reply all
Reply to author
Forward
0 new messages