Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/seungyongshim/seungyongshim.akka
https://github.com/seungyongshim/seungyongshim.akka
akkadotnet ms-di opentelemetry
Last synced: 15 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/seungyongshim/seungyongshim.akka
- Owner: seungyongshim
- License: lgpl-2.1
- Created: 2021-04-21T03:18:54.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-01-13T20:03:35.000Z (almost 2 years ago)
- Last Synced: 2024-12-03T15:49:21.687Z (20 days ago)
- Topics: akkadotnet, ms-di, opentelemetry
- Language: C#
- Homepage: https://seungyongshim.github.io/SeungYongShim.Akka/
- Size: 379 KB
- Stars: 3
- Watchers: 0
- Forks: 1
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![CI](../../workflows/CI/badge.svg)
## 1. SeungYongShim.Akka.DependencyInjection
### Production
``` csharp
[Fact]
public async Task Production()
{
// Arrange
var host = Host.CreateDefaultBuilder()
.UseAkka("ProductionSystem", string.Empty, sys =>
{
sys.ActorOf(sys.PropsFactory().Create(), "Parent");
})
.Build();await host.StartAsync();
var actorSystem = host.Services.GetService();// Act
var ret = await actorSystem.ActorSelection("/user/Parent")
.Ask("Hello");ret.Should().Be("Hello, Kid");
await host.StopAsync();
}
```
### UnitTest using TestActor
```csharp
[Fact]
public async Task Check_Child_Actor_Recieved_Messages()
{
// Arrange
var host = Host.CreateDefaultBuilder()
.UseAkka("TestSystem", string.Empty, sys =>
{
sys.ActorOf(sys.PropsFactory().Create(), "Parent");
})
.UseAkkaWithXUnit2(typeof(ChildActor))
.Build();await host.StartAsync();
var testKit = host.Services.GetService();
// Act
testKit.ActorSelection("/user/Parent").Tell("Hello");// Assert
testKit.ExpectMsg().Should().Be("Hello, Kid");var child1 = await testKit.Sys.ActorSelection("/user/Parent/Child1")
.ResolveOne(5.Seconds());
child1.Path.Name.Should().Be("Child1");await host.StopAsync();
}
```## 2. SeungYongShim.Akka.OpenTelemetry
### TraceLocalActorRefProvider Only
* Not Support Remote, Cluster
* Not Support Local Router![](./images/opentelemetry.png)