Also, following the docs to add serilog, but I get: An unhandled exception of type 'Akka.Configuration.ConfigurationException' occurred in Akka.dll
Additional information: Logger specified in config cannot be found: "Akka.Logger.Serilog.SerilogLogger, Akka.Logger.Serilog"
loggers = ["Akka.Logger.Serilog.SerilogLogger, Akka.Logger.Serilog", "Akka.Event.StandardOutLogger, Akka"]
works fine here... got to be some sort of issue with missing files(?)
var section = (AkkaConfigurationSection)ConfigurationManager.GetSection("akka");
foreach (var port in ports)
{
//Override the configuration of the port
var config =
ConfigurationFactory.ParseString("akka.remote.helios.tcp.port=" + port)
.WithFallback(section.AkkaConfig);
//create an Akka system
var system = ActorSystem.Create("ClusterSystem", config);
//create an actor that handles cluster domain events
system.ActorOf(Props.Create(typeof(SimpleClusterListener)), "clusterListener");
}
ActorSystem
allow-local-routees=off
Cluster
to send them MemberUp
messages about the availability of particular nodes
private void Ready()
{
// kick off the job
Receive<IStartJobV1>(start =>
{
Subscribers.Add(start.Requestor);
JobStarter = Context.System.Scheduler.ScheduleTellRepeatedlyCancelable(TimeSpan.FromMilliseconds(20),
TimeSpan.FromMilliseconds(20), Self, new AttemptToStartJob(start), Self);
});
Receive<AttemptToStartJob>(start =>
{
var self = Self;
CoordinatorRouter.Ask<Routees>(new GetRoutees()).ContinueWith(tr =>
{
return new CrawlCanStart(start.Job, tr.Result.Members.Count());
}).PipeTo(self);
});
Receive<CrawlCanStart>(start => start.NodeCount > 0, start =>
{
var downloadRootDocument = new DownloadWorker.DownloadHtmlDocument(new CrawlDocument(start.Job.Job.Root));
//should kick off the initial downloads and parsing
//var routees = CoordinatorRouter.Ask<Routees>(new GetRoutees()).Result;
CoordinatorRouter.Tell(downloadRootDocument);
JobStarter.Cancel();
Become(Started);
Stash.UnstashAll();
});
Receive<CrawlCanStart>(start =>
{
Log.Debug("Can't start job yet. No routees.");
});
ReceiveAny(o => Stash.Stash());
}
Ask
the routee to GetRoutees
, which will return a Routees
message.
Routees.Members.Count()
is greater than zero, then the router has cluster nodes it can talk to
Members.Count
is greater than zero
AtLeastOnceDeliveryActor
from Akka.Persistence
var section = (AkkaConfigurationSection)ConfigurationManager.GetSection("akka");
section.AkkaConfig
object, which is where you'll find the Config
that we usually automatically load into the ActorSystem
/dev
branch.
System.ArgumentException: '7' is not a valid version string.
for some reason, and there is not a single '7' digit in my entire project