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 class LogAttribute : ActionFilterAttribute { | |
private IDictionary<string, object> parameters; | |
private string description; | |
public LogAttribute(string description) { | |
this.description = description; | |
} | |
public override void OnActionExecuting(ActionExecutingContext filterContext) { | |
parameters = filterContext.ActionParameters; |
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 abstract class BackoffProtocol | |
{ | |
/// <summary> | |
/// I made the TrackedMsg generic so you wont have to do manual matching in your child actor. | |
/// Downside is, that it limits your communication options with the child actor. | |
/// </summary> | |
/// <typeparam name="T"></typeparam> | |
[Serializable] | |
public sealed class TrackedMsg<T> | |
{ |
NewerOlder