This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[TestFixture()] | |
public class ChangeModeTests : RavenTestDriver | |
{ | |
public ChangeModeTests() | |
{ | |
ConfigureServer(new TestServerOptions() | |
{ | |
}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// a=>process1 =>ack | |
/// / \ | |
/// / \ | |
/// a=>(a)=>BROADCAST - a=>process2 =>ack ZIP=>transform(a, completionSignal) | |
/// \ / | |
/// \ / | |
/// a=>process3 => ack | |
public static Flow<I, O, NotUsed> ParralelProcessingStream<I, O>(params Flow<I, O, NotUsed>[] processingFlows) | |
{ | |
return Flow.FromGraph(GraphDsl.Create(builder => |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// As translated from: https://doc.akka.io/docs/alpakka/current/patterns.html#passthrough | |
/// </summary> | |
public class PassThroughFlow | |
{ | |
public static IGraph<FlowShape<A, (T,A)>, NotUsed> create<A,T>(Flow<A, T, NotUsed> flow) { | |
return create(flow, Keep.Both); | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Test] | |
public void Can_Serialize_ICommandResult_With_Sql_Exception() | |
{ | |
SqlException exception; | |
try | |
{ | |
throw SqlExceptionCreator.NewSqlException(101); | |
} catch(SqlException ex) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Project Sdk="Microsoft.NET.Sdk"> | |
<PropertyGroup> | |
<TargetsForTfmSpecificBuildOutput>$(TargetsForTfmSpecificBuildOutput);PackReferencedProjectOutputs</TargetsForTfmSpecificBuildOutput> | |
</PropertyGroup> | |
// we put this target in an props file and import it | |
<Target Name="PackReferencedProjectOutputs" DependsOnTargets="BuildOnlySettings;ResolveReferences"> | |
<ItemGroup> | |
<BuildOutputInPackage Include="@(ReferenceCopyLocalPaths->WithMetadataValue('ReferenceSourceTarget', 'ProjectReference'))" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Project Sdk="Microsoft.NET.Sdk"> | |
<PropertyGroup> | |
<TargetsForTfmSpecificBuildOutput>$(TargetsForTfmSpecificBuildOutput);PackReferencedProjectOutputs</TargetsForTfmSpecificBuildOutput> | |
</PropertyGroup> | |
// we put this target in an props file and import it | |
<Target Name="PackReferencedProjectOutputs" DependsOnTargets="BuildOnlySettings;ResolveReferences"> | |
<ItemGroup> | |
<BuildOutputInPackage Include="@(ReferenceCopyLocalPaths->WithMetadataValue('ReferenceSourceTarget', 'ProjectReference'))" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Premise: | |
We need an extra manifest column for EventAdapters. Because SerializerWithStringManifest type serializers are not compatible. | |
Findings: | |
EventAdapters are registered via an ActorSystem extension. And they are utilised based on an type -> adapter mapper. Which means if you want to utilise them you have to provide a mapping for the message type you want to use it on. Same concept as how serialization-bindings work. | |
EventAdapters are layered in the persistence system. Like a layer of a sandwich :P. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cluster { | |
seed-nodes = ["akka.tcp://TradingRoomActors@localhost:8083"] | |
roles = ["traderworker"] | |
singleton { | |
singleton-name = "TraderActor" | |
role = "traderworker" | |
hand-over-retry-interval = 1s | |
} | |
singleton-proxy { | |
singleton-name = "TradesActor" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class SerializerTestHelpers | |
{ | |
public static async Task<T> AkkaSerialized<T>(this T src) | |
{ | |
var hocon = "akka.actor.provider = \"Akka.Remote.RemoteActorRefProvider, Akka.Remote\"" + | |
Environment.NewLine + | |
"akka.remote.helios.tcp.port = 0" + Environment.NewLine + | |
"akka.remote.helios.tcp.hostname = localhost"; | |
var sys = ActorSystem.Create("src");//, ConfigurationFactory.ParseString(hokon)); | |
await sys.Terminate(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<configuration> | |
<configSections> | |
<section name="akka" type="Akka.Configuration.Hocon.AkkaConfigurationSection, Akka"/> | |
</configSections> | |
<akka> | |
<hocon> | |
akka { | |
stdout-loglevel = DEBUG |
NewerOlder