Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6616921
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T20:38:29+00:00 2026-05-25T20:38:29+00:00

All started with question Scala, Actors, what happens to unread inbox messages? . I

  • 0

All started with question “Scala, Actors, what happens to unread inbox messages?“. I was thinking how to avoid such problems in large system with many actors.

I found myself writing something like this:

react {
  //all cases
  case any: AnyRef => logMessageWithoutCase(any)
}

Is it good avoidance from memory leaks or is it have some side effects?

UPDATE 1 Thanks to @Alexey Romanov and @Luigi Plinge, if in the system will have some Spam actor?
Something like this:

react{
  //all cases
  case msg: Any => Spam!msg
}

And finally in Spam will log or save to database. I think, it is more intuitive solution.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T20:38:30+00:00Added an answer on May 25, 2026 at 8:38 pm

    You might also investigate using Akka actors, which do not suffer from this problem because they enforce in-sequence message processing. Here, unhandled messages get passed to the unhandled() callback, which by default logs and throws an exception.

    Another thing to consider is that Akka actors will replace the current scala.actor package in the medium term. This will be especially beneficial for large systems with many actors, because the current Scala actors are not as light-weight as Akka actors.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I started by asking this question I wish to Select all rows which contain
I read all the answers that popped up when I started posting this question
This question is for all NoSQL and specially mongoDB experts out there. I started
Is it possible to stop all started services when the user hits the Home
EDIT I've just started skimming Codd's famous 1970 paper that started it all, that
I've been reading StackOverflow too much and started doubting all the code I've ever
On my new Dell XPS laptop, I've just started loading all of my goodies
I started using NetBeans today, and it was all going swimmingly, until I came
I just started using Qt and noticed that all the example class definitions have
when started, jetty per default loads all directories and war-files in its webapps directory,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.