问题标签 [akka.net]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
221 浏览

c# - Akka.net starting and stopping with no activity

I'm trying to send a message from a typesafe akka actor in Scala (2.4.11) to Akka.net actor in C# (1.0.4)

I have a weird problem with my .Net actor, it keeps saying started then stopped, but I have no clue whats happening under the hood:

A piece of Akka.net log:

It's doing the start/stop on every message sent, but actor doesn't execute, how can I probably check whats happening?

0 投票
1 回答
84 浏览

c# - 大邮件 Sender.Forward 133KB

我正在尝试发送一个 txt 文件(大小 133 kB)

这是我的客户代码

这是行不通的。

0 投票
2 回答
2769 浏览

c# - vs2015如何解决Newtonsoft.Json冲突

我尝试将Akka.NET构建为build all ,但出现错误:

CS0433:Configuration\Hocon\HoconObject.cs(47,10):“Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed”和“Newtonsoft.Json, Version=”中都存在“JsonIgnoreAttribute”类型7.0.0.0,文化=中性,PublicKeyToken=30ad4fe6b2a6aeed'

我不知道为什么 vs2015 会在 foler而不是参考路径中找到“Newtonsoft.Json”C:\Program Files (x86)\Microsoft Visual Studio 12.0\Blend\..\..\packages\Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll

是 akka.net 项目文件Akka.csproj

请帮我解决问题。谢谢

- - - - - - - - - - 更新 - - - - - - - -

我发现Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll如下: 在此处输入图像描述

Nuget现在有问题吗?

0 投票
1 回答
668 浏览

azure - Sending Akka.net cluster gossip to Azure worker role console

I'm developing an Azure cloud service including multiple worker roles that form an akka.net cluster. How do I accomplish getting the cluster gossip and other messages end up in the compute emulator console windows?

0 投票
1 回答
1199 浏览

c# - Akka.net / 泛型和数据库和实体框架

嗨,我对 akka.net 很陌生!所以对任何奇怪的问题表示歉意:-)

我正在研究访问数据库的演员。一个是阅读,一个是写作。两者都由路由器根据工作负载根据需要创建它们。

为了避免为数据库中的每种类型创建,我想将泛型与表达式结合使用。消息大致如下:

在演员中,我想使用定义的表达式并根据请求检索实体以进行进一步处理或至少将它们发回 - 如下所示:

我现在的问题是,有没有人使用这种方法来访问数据库,如果是,有什么经验?

REM:由于参与者系统与任何外部请求者进行通信,所有请求者都共享一组公共对象定义 - 就像数据库对象一样。

0 投票
1 回答
1071 浏览

akka.net - Akka.NET - 集群和 ActorSelection 路径

我有一个 akka.net 集群,我想向本地和远程的参与者发送消息,并且所有参与者都具有路径“/user/foobar”(至少在本地)。我应该使用 ActorSelection,路径应该是什么样子才能同时定位匹配的本地和远程演员?

0 投票
1 回答
324 浏览

akka.net - 如何为 akka.net 启用消息持久性

全部

是否可以将 akka.net 演员收件箱消息存储在数据库中?如果 akka.net 系统崩溃的主机会发生什么?

0 投票
1 回答
964 浏览

akka.net - Node doesn't rejoin cluster after being downed

I'm using Akka.NET's cluster (1.0.5) functionality to implement a service that consists of a master node that receives requests over HTTP and farms the work out to worker nodes that have joined the cluster.

The idea is to be able to easily accomplish the following:

  • add worker nodes to cluster when demand is high (check)

  • be able to reboot the master node or take it offline (maintentance/misbehaviour/whatever) and have the workers reconnect when it becomes available (check)

  • upgrade/reboot a misbehaving worker and have it reconnect to the master node (fail!)

The first point works as you'd expect: a new instance (Azure Cloud Service worker role) is spun up, and joins the master - which is also the seed node.

For the second point, all worker nodes have an actor that listens to cluster gossip and it determines if the master node has died. If this is the case, the worker node actor system will be rebooted.

The last point is where I'm stuck. The master node also listens to cluster gossip to determine when a worker has become unreachable (ClusterEvent.UnreachableMember) or is shutting down (Exiting status) and decides if it should be downed. According to what I've understood from documentation, the only way to have a "new" version of the same node rejoin the cluster is to down the old version first.

Unfortunately this doesn't seem to be happening. In the test scenario I ran to reproduce the problem locally in the compute emulator, these were the steps:

  1. Start the master node (port 8090)

  2. Start the worker node (port 9090)

  3. Do some work

  4. Kill the worker node abruptly

  5. Start the worker node back up

Below are relevant snippets from the logs I collected for both nodes during this test:


Master:

Worker becomes unreachable:

Master node calls Cluster.Leave() and Cluster.Down() on the worker's address:

Master confirms the old node will no longer be allowed to join (seems to have a bug though, see the first line - gated instead for akka.tcp://InventoryService@0.0.0.0:9090 ms, which I imagine would be the time it is supposed to be gated):

Worker boots and tries to connect to the master:

What is happening here?


Worker:

Booting back up after being killed:

And thats it...nothing else gets written to the log!


Full log files:

Master cluster config:

Worker's config is the same, but only has the InventoryServiceWorker role.

What am I missing here? Is this a configuration problem? (I'm hoping its not a bug - I've seen someone else report a similar problem on Github).

EDIT:

Just to be clear, I'm not using the Akka.dll from Nuget since it contains a serialization bug - I checked ou the current master applied the fix and did a Release build. The logs have debug information because I kept the PDB from the build.

EDIT 2:

In the worker log, after rebooting, the event Akka.Cluster.InternalClusterAction+JoinSeedNodes appears twice because I originally had a manual call to Cluster.JoinSeedNodes(). I've since removed this but the result is still the same.

0 投票
1 回答
349 浏览

f# - 为什么 Akka.Net F# API 定义了 actorOf2 而没有定义 actorOf3、actorOf4 等?

我正在研究 F# Akka.Net API,它与 C# 对应物完全不同,因为它试图以惯用的方式公开 Akka 功能。所以它引入了一个计算表达式actor和几个辅助函数actorOfactorOf2

actorOf对于生成不依赖于其他演员的演员很有用,并且actorOf2允许发送另一个演员作为正在创建的演员的参数,如上所示。

这很清楚,但我想知道仅将单个演员作为参数有什么特别之处?定义actorOf3actorOf4等是否有助于向正在创建的演员发送多个演员参数?例如,C# 泛型 Action<...> 宏具有最多 16 个动作参数的定义。定义几个actorOfX函数有意义吗?例如,来自 Akka.Net bootcamp 的使用验证操作的代码如下所示:

你可以看到actor在链中相互引用:consoleReaderActor引用validationActor和validationActor引用consoleWriterActor。但是,如果我想让 consoleReaderActor 同时引用 validationActor 和 consoleWriterActor 怎么办?使用actorOf函数似乎不可能做到这一点。

更新感谢@Horsiath 的回答。我查看了 Akka.Net 训练营(F# 版本)中的一课,实际上可以在生成新演员时指定多个演员:

0 投票
0 回答
290 浏览

akka.net - Akka.net Akka.IO TCP 客户端大消息

我将 Akka.IO 用于 TCP 客户端,当我尝试发送大于 77KB 左右的消息时,它失败且没有错误 - 远程端没有得到任何响应。适用于所有较小的消息。尝试更改一些配置参数,例如 io.tcp.direct-buffer-size,但没有运气。我错过了什么?使用版本 1.0.5