• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Scala Actor send/ask failure while sending message from within callback/curried function

 
Ranch Hand
Posts: 37
Eclipse IDE Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The error that I got is like:

[INFO] [02/26/2014 17:56:28.472] [application-akka.actor.default-dispatcher-17] [akka://application/deadLetters] Message [models.service.ServiceBuckets] from Actor[akka://application/user/$v#-1897069859] to Actor[akka://application/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'.

Has anyone come across this kind of error?
 
Khuma Chhakchhuak
Ranch Hand
Posts: 37
Eclipse IDE Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, I am answering my own question but it is not perfect though.

The sender needs to be assinged to a "val" and then send/pass on necessary message to the new "val sender".

//Pseudocode -

val newSender = sender
someCallBackCurryFun {
// Some processing
newSender ! "Some message here" // newSender rather than sender here..
}

Wondering if someone else might have a better idea on this?
 
Bartender
Posts: 2407
36
Scala Python Oracle Postgres Database Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for posting your own answer - seems like you are the local Akka expert!

I know almost nothing about Akka, but I just looked in Akka Concurrency by Derek Wyatt, where he mentions (p.102) that the dead letter office is used as a default sender if you don't provide one. Also, it says in there that "sender" is actually a method, not a value, which might be why you need to create the val newSender in order to access the sender instance from an incoming message, then use this newSender value for your next message.

The dead letter log messages may or may not be a sign of a problem according to this documentation.

Anybody else out there know enough Akka to help Khuma properly here?
 
Greenhorn
Posts: 1
Scala Mac OS X IntelliJ IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's not an error, just an info and you can disable it in the application.conf, just add:
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic