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 8950839
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T13:31:40+00:00 2026-06-15T13:31:40+00:00

I have a setup in which an actor(A) creates an actor(B) which it supervises

  • 0

I have a setup in which an actor(A) creates an actor(B) which it supervises and restarts when it crashes. From outside the actor system I want to get some value from the ‘nested’ actor B.

I can directly ask the actorSystem for the nested actor using:

val nestedActorB = myActorSystem.actorFor("/user/A/B")

Can I keep a reference to this actor or should I ask the actorSystem for the ref each time I want to ask the nested actor something. (Or should I ask the parent actor for the ref)?

What would be a best practice in this scenario?
(scala 2.9.1 and akka 2.0.4)

Thanks,
Albert

  • 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-06-15T13:31:41+00:00Added an answer on June 15, 2026 at 1:31 pm

    Yes you can keep a reference to the actor and not ask the system every time with actorFor.

    There is a difference between local and remote actors and the documentation passage you are referring to is ambiguous and I’ve opened a ticket.

    A local actor is only looked up once during the actorFor call so it needs to exist before you look it up, while sends to a remote actor are always by path and the remote actor is looked up on the remote node every time.

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

Sidebar

Related Questions

I have a Setup Project which uses a System.Configuration.Install.Installer Class forhandling some custom actions.
I have just setup a new local site (localhost/pfb.net/) which has been cloned from
I have some onchange events setup in jQuery which are used to populate a
I have a setup which loads data from MySQL with PHP and displays it
I have a setup in which some applications communicate with each other via Tibco
I have a VS2008 setup project, which creates a setup.msi which installs a WinForms
I have setup a java servlet which accepts parameters from the URL and have
i have setup some ajax, which i am just testing now, pretty much the
I have a notifications setup which perodically retrieves notifications from a database via an
i have created an setup.exe,which can be distributable.it has some dependency on visual studio's

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.