These are chat archives for akkadotnet/akka.net

20th
Apr 2018
Elya Sikerin
@lumarama
Apr 20 2018 09:46

Newbie is here, I'm trying to bring up simplest Akka.NET cluster with two nodes (one is seed). Cluster is up and running and it seems that I can send a message to the seed node using:

_system.ActorSelection("akka.tcp://MyActorSystem@localhost:2551/user/reader").Tell("Hello from Writer!");

But in the receiving actor I can't reply to the sender using Sender.Tell(...), because Sender.Path is akka://MyActorSystem/deadLetters

Any idea what could be wrong?

So the message is delivered to the destination, but sender is deadLetters
Stijn Herreman
@stijnherreman
Apr 20 2018 11:04
You need to use the overload where you specify a sender
.Tell(message, sender)
where sender is an IActorRef
I assume you're using Tell() outside an existing actor?
Bartosz Sypytkowski
@Horusiath
Apr 20 2018 12:51
@lumarama it's normal if you don't use it inside other actor. In that case try to call Ask instead of Tell and simply await for the result
Marin
@mrn-aglic
Apr 20 2018 13:08
Screen Shot 2018-04-20 at 15.04.09.png
Marin
@mrn-aglic
Apr 20 2018 13:13
@Aaronontheweb I didn't know how to explain it better, so I marked the brackets... P.S. I have a question regarding Akka.Logger.NLog... I took a look at the source code (https://github.com/AkkaNetContrib/Akka.Logger.NLog/blob/dev/src/Akka.Logger.NLog/NLogLogger.cs) and it seems to me like the the final parameter to the LogEvent method is always null (??)... I think this because, when I tried to log ${all-event-properties}, they do not get written to file... P.S. this started because I am interested to know if I can set to order to which Akka events are logged to file... some events are written out of order - e.g. a parent actor's message to create children is logged after a message is sent to the child
Caio Proiete
@caioproiete
Apr 20 2018 13:53
If one would want to extend Akka.net so that it works with other transport mechanisms like Named Pipes, or FTP, for example. Where would be a good starting point?
Any examples of other types of custom transports out there?
me-slove
@me-slove
Apr 20 2018 14:14
@caioproiete I would think Named Pipes would not be too bad. Here is a link to DotNetty in GitHub https://github.com/akkadotnet/akka.net/tree/dev/src/core/Akka.Remote/Transport/DotNetty
Caio Proiete
@caioproiete
Apr 20 2018 14:18
Thanks @me-slove that's helpful. If I understand it correctly, DotNetty is the default transport mechanism for remote actors, isn't it?
me-slove
@me-slove
Apr 20 2018 14:19
Yep
Caio Proiete
@caioproiete
Apr 20 2018 14:21
Cool. Thanks. I'm looking to have Excel Add-ins talk to each other via Akka.net on the same machine, but different processes, and I can't listen on a TCP port on the client machines, so need something else such as memory-mapped files or named pipes. I wonder if anyone else here had this need before
me-slove
@me-slove
Apr 20 2018 14:24
What would the actors be doing? Are they just relaying information or doing work?
Caio Proiete
@caioproiete
Apr 20 2018 14:29
@me-slove They'd be doing both, but 90% of the time just relaying information to each other
me-slove
@me-slove
Apr 20 2018 14:32
@Aaronontheweb put together a sample that uses Signal R inside of ASP.NET you might want to have a look at. It shows how to get data from outside of an actor system which could be useful to you. I don't remember the name off-hand. I'll look
@caioproiete here's the link https://petabridge.com/blog/akkadotnet-aspnet/
Caio Proiete
@caioproiete
Apr 20 2018 14:38
Thanks @me-slove I'll read that sample code carefully!
Bibek Dawadi
@bibekdw
Apr 20 2018 17:34
Hi, I am having issue trying to publish the .net core console app with akka.net core for RHEL. Anyone has tried this already?
Aaron Stannard
@Aaronontheweb
Apr 20 2018 17:35
@caioproiete I have an example that uses the latest .NET Core versions of all that too
but I haven't gone through and updated the docs much
since I only just finished the sample a few weeks back
that's a fully dockerized Akka.NET cluster
but the WebCrawler.Web example shows how to work with the beta SignalR for .NET Core APIs and the ASP.NET Core service locator et al
petabridge/akkadotnet-code-samples#66 - explained how to run the sample with docker in the original PR
Aaron Stannard
@Aaronontheweb
Apr 20 2018 17:42
@bibekdw should work fine - what's the issue?
Bibek Dawadi
@bibekdw
Apr 20 2018 17:45
@Aaronontheweb publish failed with some exception. It runs fine if I remove akka.net reference. I am using visual studio 2017 professional. Let me ping you the exception from the tmp file
image.png
Aaron Stannard
@Aaronontheweb
Apr 20 2018 17:49
doesn't look like it's an Akka.NET issue though
that's a VS exception
I'd try a dotnet publish CLI command
and see how that goes
Bibek Dawadi
@bibekdw
Apr 20 2018 17:50
yeah exception is coming from VS only. will try that. One more thing is I have "Detected package downgrade:" kind of warnings for few akka dependencies. That should be fine right?
Caio Proiete
@caioproiete
Apr 20 2018 17:53
@Aaronontheweb Thanks! I'll definitely check it out!
A diff question: Are there any OctopusDeploy users here? How are you managing changes to HOCON configuration files for the different environments?
Elya Sikerin
@lumarama
Apr 20 2018 18:40
@Horusiath @stijnherreman Thanks guys! I'm wondering if it is normal practice to
@Horusiath @stijnherreman I'm wondering if this is normal practice to find another (remote) actor using it's full path like this: Context.ActorSelection("akka.tcp://MyActorSystem@localhost:2551/user/reader")? The problem is that I don't know the port of non-seed node. As you need to specify 0 as port for non-seed nodes, so that system assigns port automatically.
Aaron Stannard
@Aaronontheweb
Apr 20 2018 19:40
are you using akka.cluster @lumarama ?