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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T19:38:53+00:00 2026-06-07T19:38:53+00:00

All the tutorials that I have read work like this: class HelloWorldActor extends Actor

  • 0

All the tutorials that I have read work like this:

class HelloWorldActor extends Actor {
  def receive = {
    case "Hello" => self.reply("World")
  }
}

val myActor = system.actorOf(Props[MyActor], name = "myactor")

I am wondering if AKKA supports the act() function inside an Actor class like this:

class HelloWorldActor extends Actor {
  def act() = {

  }
}

And then you can call:

val myActor = new HelloWorldActor
myActor.start()

I want to do this because my actor won’t be receieving any messages. It just works on its own. So can I use the act() function inside my AKKA actor?

  • 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-07T19:38:55+00:00Added an answer on June 7, 2026 at 7:38 pm

    In Akka, your actor should start automatically after creation using the system. But it sounds as if you want to use the actor like a plain thread we all know from Java. I would say that this is not the right way from an idiomatic point of view. You can of course just add a start message to your actor, send it to the actor after creation, and do your processing in the handler. But perhaps you should consider using a plain thread or a Future instead of an actor if you do not want to react on any message?

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

Sidebar

Related Questions

Almost all of the examples in the jQuery tutorials that I've read, usually use
I have read a number of forums posts and blog tutorials and all of
I have something that looks like this: POST /o/oauth2/token HTTP/1.1 Host: accounts.google.com Content-Type: application/x-www-form-urlencoded
I am pulling my hair out!! I have read all of the examples, tutorials,
All tutorials I can find always tackle with toy uml use cases like the
I'm learning Eclipse PDT for PHP development. In pretty much all tutorials I've read
Of all the tutorials i have come across to connect to an external database
I have seen tutorials all over the place for explaining how to get Code
So I saw this post here and read it and it seems like bulk
Thanks in advance for taking the time to read this. Apologies that it is

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.