-3

I am trying to send a txt file (size 133 kB)

public class HelloActor : UntypedActor
{
    public HelloActor()
    {
    }

    protected override void OnReceive(object request)
    {
        var data = System.IO.File.ReadAllText(AppDomain.CurrentDomain.BaseDirectory+"myfile.txt");
        Sender.Forward(data);
    }
}

and this is my client code

var actor = System.ActorSelection("HelloActor");
return await actor.Ask<string>(null, TimeSpan.FromHours(1));

This is not working.

crashmstr
  • 28,043
  • 9
  • 61
  • 79
Encep
  • 23
  • 6
  • 5
    "is not working" isn't a description that anyone can work with. When a mechanic asks you what's wrong with your car, do you think "is not working" is enough? – spender Nov 20 '15 at 13:23
  • I mean Akka did not give any response to what I send from server to client, but i have already set maximum-frame-size – Encep Nov 20 '15 at 13:29

1 Answers1

1

Your issue has nothing to do with maximum-frame-size, as probably your actor behavior haven't been called at all. Assuming that you have created your actor using system's ActorOf and named it HelloActor, two things in your code are invalid:

  1. It's not allowed to send null as message. Specify some specific value instead. This error is actually printed in error log.
  2. Your actor selection uses invalid path. For top level actor in user space it would be /user/HelloActor. You'd find it in the logs as message will not reach the recipient and be pushed into dead letters instead. You can read more about actor paths here.
Bartosz Sypytkowski
  • 7,463
  • 19
  • 36