diff --git a/k8s/tradeprocessor-deploy.yaml b/k8s/tradeprocessor-deploy.yaml index 59f4c2b8..846caa8f 100644 --- a/k8s/tradeprocessor-deploy.yaml +++ b/k8s/tradeprocessor-deploy.yaml @@ -19,7 +19,7 @@ metadata: app: trade-processor spec: serviceName: trade-processor - replicas: 1 + replicas: 3 selector: matchLabels: app: trade-processor diff --git a/src/Akka.CQRS.Pricing.Service/app.conf b/src/Akka.CQRS.Pricing.Service/app.conf index e046be69..cbb5f932 100644 --- a/src/Akka.CQRS.Pricing.Service/app.conf +++ b/src/Akka.CQRS.Pricing.Service/app.conf @@ -22,6 +22,7 @@ akka { sharding{ role = "pricing-engine" + state-store-mode = ddata } client.receptionist.role = pricing-engine # stops ClusterClient gossip from going to the worker nodes diff --git a/src/Akka.CQRS.TradePlacers.Service/Program.cs b/src/Akka.CQRS.TradePlacers.Service/Program.cs index e78d5648..0dcc1488 100644 --- a/src/Akka.CQRS.TradePlacers.Service/Program.cs +++ b/src/Akka.CQRS.TradePlacers.Service/Program.cs @@ -32,7 +32,7 @@ static int Main(string[] args) Props.Empty.WithRouter(new ClusterRouterGroup( new ConsistentHashingGroup(new[] {"/user/orderbooks"}, TradeEventConsistentHashMapping.TradeEventMapping), - ClusterRouterGroupSettings.FromConfig(conf))), "tradesRouter"); + new ClusterRouterGroupSettings(10000, new []{ "/user/orderbooks" }, true, useRole:"trade-processor"))), "tradesRouter"); Cluster.Cluster.Get(actorSystem).RegisterOnMemberUp(() => { diff --git a/src/Akka.CQRS.TradePlacers.Service/app.conf b/src/Akka.CQRS.TradePlacers.Service/app.conf index 408b2d55..d8635ad7 100644 --- a/src/Akka.CQRS.TradePlacers.Service/app.conf +++ b/src/Akka.CQRS.TradePlacers.Service/app.conf @@ -3,7 +3,7 @@ akka { provider = cluster deployment{ - /tradeRouter { + /tradesRouter { router = consistent-hashing-group routees.paths = ["/user/orderbooks"] cluster { diff --git a/src/Akka.CQRS.TradeProcessor.Service/app.conf b/src/Akka.CQRS.TradeProcessor.Service/app.conf index 2a6734d5..8d3803de 100644 --- a/src/Akka.CQRS.TradeProcessor.Service/app.conf +++ b/src/Akka.CQRS.TradeProcessor.Service/app.conf @@ -21,6 +21,7 @@ sharding{ role = "trade-processor" + state-store-mode = ddata } } diff --git a/src/Akka.CQRS/Entities/Order.cs b/src/Akka.CQRS/Entities/Order.cs index 92226136..246cee4c 100644 --- a/src/Akka.CQRS/Entities/Order.cs +++ b/src/Akka.CQRS/Entities/Order.cs @@ -14,7 +14,7 @@ namespace Akka.CQRS /// /// Represents an unfilled or partially unfilled trade inside the matching engine. /// - public struct Order : IWithOrderId, IWithStockId, IEquatable, IComparable, IComparable + public sealed class Order : IWithOrderId, IWithStockId, IEquatable, IComparable, IComparable { /// /// Represents an empty or completed trade.