Skip to content

Commit

Permalink
Merge pull request petabridge#21 from petabridge/dev
Browse files Browse the repository at this point in the history
v0.1.0 Akka.Persistence.Extras Stable Release
  • Loading branch information
Aaronontheweb authored Feb 15, 2019
2 parents 5e009b2 + e819202 commit b41f2e1
Show file tree
Hide file tree
Showing 34 changed files with 2,239 additions and 133 deletions.
45 changes: 0 additions & 45 deletions Akka.AtLeastOnceDeliveryJournaling.sln

This file was deleted.

56 changes: 56 additions & 0 deletions Akka.Persistence.Extras.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26430.14
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{79D71264-186B-4F62-8930-35DD9ECCAF3B}"
ProjectSection(SolutionItems) = preProject
build.cmd = build.cmd
build.fsx = build.fsx
build.ps1 = build.ps1
build.sh = build.sh
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Akka.Persistence.Extras", "src\Akka.Persistence.Extras\Akka.Persistence.Extras.csproj", "{28DC51D3-4F26-4F9E-A069-B9A01E426640}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Akka.Persistence.Extras.Tests", "src\Akka.Persistence.Extras.Tests\Akka.Persistence.Extras.Tests.csproj", "{2A77FABC-122D-4228-BFBA-D00F432CE517}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Akka.Persistence.Extras.Tests.Performance", "src\Akka.Persistence.Extras.Tests.Performance\Akka.Persistence.Extras.Tests.Performance.csproj", "{22D4AADD-A7B5-4A01-8980-9E7C21DCFDF8}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{82C25BE2-77BE-47D9-A3FD-632E92FA95CC}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Akka.Persistence.Extras.Demo.DeDuplicatingReceiver", "src\Akka.Persistence.Extras.Demo.DeDuplicatingReceiver\Akka.Persistence.Extras.Demo.DeDuplicatingReceiver.csproj", "{271A63AA-61A7-48E1-BF25-7C3AF8238A29}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{28DC51D3-4F26-4F9E-A069-B9A01E426640}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{28DC51D3-4F26-4F9E-A069-B9A01E426640}.Debug|Any CPU.Build.0 = Debug|Any CPU
{28DC51D3-4F26-4F9E-A069-B9A01E426640}.Release|Any CPU.ActiveCfg = Release|Any CPU
{28DC51D3-4F26-4F9E-A069-B9A01E426640}.Release|Any CPU.Build.0 = Release|Any CPU
{2A77FABC-122D-4228-BFBA-D00F432CE517}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2A77FABC-122D-4228-BFBA-D00F432CE517}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2A77FABC-122D-4228-BFBA-D00F432CE517}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2A77FABC-122D-4228-BFBA-D00F432CE517}.Release|Any CPU.Build.0 = Release|Any CPU
{22D4AADD-A7B5-4A01-8980-9E7C21DCFDF8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{22D4AADD-A7B5-4A01-8980-9E7C21DCFDF8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{22D4AADD-A7B5-4A01-8980-9E7C21DCFDF8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{22D4AADD-A7B5-4A01-8980-9E7C21DCFDF8}.Release|Any CPU.Build.0 = Release|Any CPU
{271A63AA-61A7-48E1-BF25-7C3AF8238A29}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{271A63AA-61A7-48E1-BF25-7C3AF8238A29}.Debug|Any CPU.Build.0 = Debug|Any CPU
{271A63AA-61A7-48E1-BF25-7C3AF8238A29}.Release|Any CPU.ActiveCfg = Release|Any CPU
{271A63AA-61A7-48E1-BF25-7C3AF8238A29}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{271A63AA-61A7-48E1-BF25-7C3AF8238A29} = {82C25BE2-77BE-47D9-A3FD-632E92FA95CC}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {B99E6BB8-642A-4A68-86DF-69567CBA700A}
EndGlobalSection
EndGlobal
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# Akka.AtLeastOnceDeliveryJournaling
# Akka.Persistence.Extras
This package contains some additions to Akka.Persistence that many users commonly find to be useful.

You can read more about Akka.Persistence.Extras at: https://devops.petabridge.com/articles/msgdelivery/

## `AtLeastOnceDeliveryActorV2`

The [`AtLeastOnceDeliveryActor` base type](https://getakka.net/api/Akka.Persistence.AtLeastOnceDeliveryActor.html) in its current form is a total non-pleasure to use in production, for the following reasons:

Expand All @@ -16,6 +21,12 @@ The goal of this project is to rewrite the `AtLeastOnceDeliveryActor` to do the

We believe this will make the `AtLeastOnceDeliveryActor` more performant (smaller serialization / write-size impact), robust (persisted at all checkpoints), and easier to use ("it just works".)

## `DeDuplicatingReceiverActor`
This actor is on the _receiving_ side of an `AtLeastOnceDelivery` actor, and it is responsible for using a persistent strategy to ensure that messages are never processed more than once.

## `ExactlyOnceStronglyOrderedDeliveryActor`
This actor is responsible for guaranteeing an explicit message delivery order to each individually address recipient. Messages will never be delivered in any order other than FIFO using this actor - the first un-acknowledged message MUST be delivered and ACKed before the next undelivered message will be sent.

## Building this solution
To run the build script associated with this solution, execute the following:

Expand Down
6 changes: 4 additions & 2 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
#### 0.1.0 August 14 2017 ####
First release
#### 0.1.0 February 14 2019 ####
First release of Akka.Persistence.Extras. Introduces the [`DeDuplicatingReceiveActor` base class](https://devops.petabridge.com/api/Akka.Persistence.Extras.DeDuplicatingReceiveActor.html), which can be used to automatically strip out duplicates and guarantee that messages are processed exactly once by the actor.

You can read more about [how to use the `DeDuplicatingReceiveActor` with Akka.NET and other `AtLeastOnceDeliveryActor` instances here](https://devops.petabridge.com/articles/msgdelivery/deduplication.html).
8 changes: 4 additions & 4 deletions appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
"SignClient": {
"AzureAd": {
"AADInstance": "https://login.microsoftonline.com/",
"ClientId": "",
"TenantId": ""
"ClientId": "1e983f21-9ea5-4f21-ab99-28080225efc9",
"TenantId": "2fa36080-af12-4894-a64b-a17d8f29ec52"
},
"Service": {
"Url": "",
"ResourceId": ""
"Url": "https://pb-sign.azurewebsites.net/",
"ResourceId": "https://SignService/eef8e2e7-24b1-4a3b-a73b-a84d66f9abee"
}
}
}
17 changes: 6 additions & 11 deletions build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ open Fake.DotNetCli
open Fake.DocFxHelper

// Information about the project for Nuget and Assembly info files
let product = "Akka.AtLeastOnceDeliveryJournaling"
let product = "Akka.Persistence.Extras"
let configuration = "Release"

// Metadata used when signing packages and DLLs
let signingName = "My Library"
let signingDescription = "My REALLY COOL Library"
let signingUrl = "https://signing.is.cool/"
let signingName = "Akka.Persistence.Extras"
let signingDescription = "Akka.Persistence.Extras library for use with Akka.NET."
let signingUrl = "https://devops.petabridge.com/"

// Read release notes and version
let solutionFile = FindFirstMatchingFile "*.sln" __SOURCE_DIRECTORY__ // dynamically look up the solution
Expand All @@ -39,11 +39,6 @@ let outputTests = __SOURCE_DIRECTORY__ @@ "TestResults"
let outputPerfTests = __SOURCE_DIRECTORY__ @@ "PerfResults"
let outputNuGet = output @@ "nuget"

// Copied from original NugetCreate target
let nugetDir = output @@ "nuget"
let workingDir = output @@ "build"
let nugetExe = FullName @"./tools/nuget.exe"

Target "Clean" (fun _ ->
ActivateFinalTarget "KillCreatedProcesses"

Expand Down Expand Up @@ -114,7 +109,7 @@ Target "RunTests" (fun _ ->
info.WorkingDirectory <- (Directory.GetParent project).FullName
info.Arguments <- arguments) (TimeSpan.FromMinutes 30.0)

ResultHandling.failBuildIfXUnitReportedError TestRunnerErrorLevel.DontFailBuild result
ResultHandling.failBuildIfXUnitReportedError TestRunnerErrorLevel.Error result

projects |> Seq.iter (log)
projects |> Seq.iter (runSingleProject)
Expand All @@ -138,7 +133,7 @@ Target "NBench" <| fun _ ->
info.WorkingDirectory <- (Directory.GetParent project).FullName
info.Arguments <- arguments) (TimeSpan.FromMinutes 30.0)

ResultHandling.failBuildIfXUnitReportedError TestRunnerErrorLevel.DontFailBuild result
ResultHandling.failBuildIfXUnitReportedError TestRunnerErrorLevel.Error result

projects |> Seq.iter runSingleProject

Expand Down

This file was deleted.

13 changes: 0 additions & 13 deletions src/Akka.AtLeastOnceDeliveryJournaling.Tests/UnitTest1.cs

This file was deleted.

This file was deleted.

8 changes: 0 additions & 8 deletions src/Akka.AtLeastOnceDeliveryJournaling/Class1.cs

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\common.props" />

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
</PropertyGroup>

<ItemGroup>
<None Remove="sample.conf" />
</ItemGroup>

<ItemGroup>
<Content Include="sample.conf">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Akka.Persistence.Extras\Akka.Persistence.Extras.csproj" />
<PackageReference Include="Akka.Persistence.Sqlite" Version="$(AkkaVersion)" />
</ItemGroup>

</Project>
41 changes: 41 additions & 0 deletions src/Akka.Persistence.Extras.Demo.DeDuplicatingReceiver/Messages.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// -----------------------------------------------------------------------
// <copyright file="Messages.cs" company="Petabridge, LLC">
// Copyright (C) 2015 - 2019 Petabridge, LLC <https://petabridge.com>
// </copyright>
// -----------------------------------------------------------------------

namespace Akka.Persistence.Extras.Demo.DeDuplicatingReceiver
{
public class ReliableDeliveryEnvelope<TMessage>
{
public ReliableDeliveryEnvelope(TMessage message, long messageId)
{
Message = message;
MessageId = messageId;
}

public TMessage Message { get; }

public long MessageId { get; }
}

public class ReliableDeliveryAck
{
public ReliableDeliveryAck(long messageId)
{
MessageId = messageId;
}

public long MessageId { get; }
}

public class Write
{
public Write(string content)
{
Content = content;
}

public string Content { get; }
}
}
Loading

0 comments on commit b41f2e1

Please sign in to comment.