public ClusterSingletonManagerStartupConfig() { First = Role("first"); Second = Role("second"); Third = Role("third"); CommonConfig = ConfigurationFactory.ParseString(@" akka.loglevel = INFO akka.actor.provider = ""Akka.Cluster.ClusterActorRefProvider, Akka.Cluster"" akka.remote.retry-gate-closed-for = 1s #fast restart akka.remote.log-remote-lifecycle-events = off akka.cluster.auto-down-unreachable-after = 0s") .WithFallback(ClusterSingletonManager.DefaultConfig()) .WithFallback(ClusterSingletonProxy.DefaultConfig()) .WithFallback(MultiNodeClusterSpec.ClusterConfig()); }
public ClusterSingletonManagerLeaveSpecConfig() { First = Role("first"); Second = Role("second"); Third = Role("third"); CommonConfig = ConfigurationFactory.ParseString(@" akka.loglevel = DEBUG akka.actor.provider = ""Akka.Cluster.ClusterActorRefProvider, Akka.Cluster"" akka.remote.log-remote-lifecycle-events = off akka.cluster.auto-down-unreachable-after = off ") .WithFallback(ClusterSingletonManager.DefaultConfig()) .WithFallback(ClusterSingletonProxy.DefaultConfig()) .WithFallback(MultiNodeClusterSpec.ClusterConfig()); }
public ClusterShardingGetStatsSpecConfig() { Controller = Role("controller"); First = Role("first"); Second = Role("second"); Third = Role("third"); CommonConfig = DebugConfig(false) .WithFallback(ConfigurationFactory.ParseString(@" akka.actor { serializers { hyperion = ""Akka.Serialization.HyperionSerializer, Akka.Serialization.Hyperion"" } serialization-bindings { ""System.Object"" = hyperion } } akka.loglevel = INFO akka.actor.provider = cluster akka.remote.log-remote-lifecycle-events = off akka.cluster.auto-down-unreachable-after = 0s akka.cluster.sharding { updating-state-timeout = 2s waiting-for-state-timeout = 2s } akka.persistence.snapshot-store.plugin = ""akka.persistence.snapshot-store.inmem"" akka.persistence.journal.plugin = ""akka.persistence.journal.memory-journal-shared"" akka.persistence.journal.MemoryJournal { class = ""Akka.Persistence.Journal.MemoryJournal, Akka.Persistence"" plugin-dispatcher = ""akka.actor.default-dispatcher"" } akka.persistence.journal.memory-journal-shared { class = ""Akka.Cluster.Sharding.Tests.MemoryJournalShared, Akka.Cluster.Sharding.Tests.MultiNode"" plugin-dispatcher = ""akka.actor.default-dispatcher"" timeout = 5s } ")) .WithFallback(Sharding.ClusterSharding.DefaultConfig()) .WithFallback(Tools.Singleton.ClusterSingletonManager.DefaultConfig()) .WithFallback(MultiNodeClusterSpec.ClusterConfig()); NodeConfig(new RoleName[] { First, Second, Third }, new Config[] { ConfigurationFactory.ParseString(@"akka.cluster.roles=[""shard""]") }); }
public ActorDirectoryTestsConfig() { First = Role("first"); Second = Role("second"); Third = Role("third"); CommonConfig = ConfigurationFactory.ParseString($@" akka.actor.provider = ""Akka.Cluster.ClusterActorRefProvider, Akka.Cluster"" akka.loglevel = DEBUG akka.log-dead-letters-during-shutdown = off akka.test.timefactor = 1 akka.cluster.roles = [ {Hexagon.Constants.NodeRoleName} ] ") .WithFallback(MultiNodeClusterSpec.ClusterConfig()) .WithFallback(DistributedData.DefaultConfig()); }
public RestartNode2SpecConfig() { Seed1 = Role("seed1"); Seed2 = Role("seed2"); CommonConfig = DebugConfig(true) .WithFallback(ConfigurationFactory.ParseString(@" akka.cluster.auto-down-unreachable-after = 2s akka.cluster.retry-unsuccessful-join-after = 3s akka.remote.retry-gate-closed-for = 45s akka.remote.log-remote-lifecycle-events = INFO akka.remote.transport-failure-detector.heartbeat-interval = 1s akka.remote.watch-failure-detector.heartbeat-interval = 1s akka.remote.watch-failure-detector.acceptable-heartbeat-pause = 2s ")) .WithFallback(MultiNodeClusterSpec.ClusterConfig()); }
protected ClusterShardingMinMembersSpecConfig(string mode) { Mode = mode; First = Role("first"); Second = Role("second"); Third = Role("third"); CommonConfig = DebugConfig(false) .WithFallback(ConfigurationFactory.ParseString($@" akka.actor {{ serializers {{ hyperion = ""Akka.Serialization.HyperionSerializer, Akka.Serialization.Hyperion"" }} serialization-bindings {{ ""System.Object"" = hyperion }} }} akka.loglevel = INFO akka.actor.provider = cluster akka.remote.log-remote-lifecycle-events = off akka.cluster.min-nr-of-members = 3 akka.cluster.sharding {{ rebalance-interval = 120s #disable rebalance }} akka.persistence.snapshot-store.plugin = ""akka.persistence.snapshot-store.inmem"" akka.persistence.journal.plugin = ""akka.persistence.journal.memory-journal-shared"" akka.persistence.journal.MemoryJournal {{ class = ""Akka.Persistence.Journal.MemoryJournal, Akka.Persistence"" plugin-dispatcher = ""akka.actor.default-dispatcher"" }} akka.persistence.journal.memory-journal-shared {{ class = ""Akka.Cluster.Sharding.Tests.MemoryJournalShared, Akka.Cluster.Sharding.Tests.MultiNode"" plugin-dispatcher = ""akka.actor.default-dispatcher"" timeout = 5s }} akka.cluster.sharding.state-store-mode = ""{mode}"" akka.cluster.sharding.distributed-data.durable.lmdb {{ dir = ""target/ClusterShardingMinMembersSpec/sharding-ddata"" map-size = 10000000 }} ")) .WithFallback(Sharding.ClusterSharding.DefaultConfig()) .WithFallback(Tools.Singleton.ClusterSingletonManager.DefaultConfig()) .WithFallback(MultiNodeClusterSpec.ClusterConfig()); }
public XmlMessageSystemWithRemoteDeployTestsConfig() { DeployTarget1 = Role("deployTarget1"); DeployTarget2 = Role("deployTarget2"); Deployer = Role("deployer"); CommonConfig = ConfigurationFactory .ParseString(@" akka.loglevel = DEBUG akka.test.timefactor = 1 akka.log-config-on-start = on akka.cluster.roles = [ ""routeHere"" ] ") .WithFallback(MultiNodeClusterSpec.ClusterConfig()) .WithFallback(DistributedData.DefaultConfig()) .WithFallback(DistributedPubSub.DefaultConfig()); }
public XmlMessageSystemTestsConfig() { First = Role("first"); Second = Role("second"); Third = Role("third"); CommonConfig = ConfigurationFactory .ParseString(@" akka.loglevel = DEBUG akka.test.timefactor = 1 ") .WithFallback(MultiNodeClusterSpec.ClusterConfig()) .WithFallback(DistributedData.DefaultConfig()) .WithFallback(DistributedPubSub.DefaultConfig()); //TestTransport = true; }
protected ClusterShardingLeavingSpecConfig(string mode) { Mode = mode; First = Role("first"); Second = Role("second"); Third = Role("third"); Fourth = Role("fourth"); CommonConfig = DebugConfig(false) .WithFallback(ConfigurationFactory.ParseString($@" akka.actor {{ serializers {{ hyperion = ""Akka.Serialization.HyperionSerializer, Akka.Serialization.Hyperion"" }} serialization-bindings {{ ""System.Object"" = hyperion }} }} akka.loglevel = DEBUG akka.actor.provider = cluster akka.remote.log-remote-lifecycle-events = off akka.cluster.auto-down-unreachable-after = 0s akka.persistence.snapshot-store.plugin = ""akka.persistence.snapshot-store.inmem"" akka.persistence.journal.plugin = ""akka.persistence.journal.memory-journal-shared"" akka.persistence.journal.MemoryJournal {{ class = ""Akka.Persistence.Journal.MemoryJournal, Akka.Persistence"" plugin-dispatcher = ""akka.actor.default-dispatcher"" }} akka.persistence.journal.memory-journal-shared {{ class = ""Akka.Cluster.Sharding.Tests.MemoryJournalShared, Akka.Cluster.Sharding.Tests.MultiNode"" plugin-dispatcher = ""akka.actor.default-dispatcher"" timeout = 5s }} akka.cluster.sharding.rebalance-interval = 1s # make rebalancing more likely to happen to test for RebalanceWorker.ShardRegionTerminated akka.cluster.sharding.state-store-mode = ""{mode}"" akka.cluster.sharding.distributed-data.durable.lmdb {{ dir = ""target/ClusterShardinLeavingSpec/sharding-ddata"" map-size = 10000000 }} ")) .WithFallback(Sharding.ClusterSharding.DefaultConfig()) .WithFallback(Tools.Singleton.ClusterSingletonManager.DefaultConfig()) .WithFallback(MultiNodeClusterSpec.ClusterConfig()); }
public ClusterShardingFailureSpecConfig() { Controller = Role("controller"); First = Role("first"); Second = Role("second"); CommonConfig = DebugConfig(false) .WithFallback(ConfigurationFactory.ParseString(@" akka.actor { serializers { hyperion = ""Akka.Serialization.HyperionSerializer, Akka.Serialization.Hyperion"" } serialization-bindings { ""System.Object"" = hyperion } } akka.cluster.auto-down-unreachable-after = 0s akka.cluster.roles = [""backend""] akka.cluster.sharding { coordinator-failure-backoff = 3s shard-failure-backoff = 3s } akka.persistence.snapshot-store.plugin = ""akka.persistence.snapshot-store.inmem"" akka.persistence.journal.plugin = ""akka.persistence.journal.memory-journal-shared"" akka.persistence.journal.MemoryJournal { class = ""Akka.Persistence.Journal.MemoryJournal, Akka.Persistence"" plugin-dispatcher = ""akka.actor.default-dispatcher"" } akka.persistence.journal.memory-journal-shared { class = ""Akka.Cluster.Sharding.Tests.MemoryJournalShared, Akka.Cluster.Sharding.Tests.MultiNode"" plugin-dispatcher = ""akka.actor.default-dispatcher"" timeout = 5s } ")) .WithFallback(Sharding.ClusterSharding.DefaultConfig()) .WithFallback(Tools.Singleton.ClusterSingletonManager.DefaultConfig()) .WithFallback(MultiNodeClusterSpec.ClusterConfig()); TestTransport = true; }
public PubSubSpecConfig() { Node1 = Role("node1"); Node2 = Role("node2"); CommonConfig = DebugConfig(true) .WithFallback(ConfigurationFactory.ParseString(@" akka.remote.retry-gate-closed-for = 5s akka.remote.log-remote-lifecycle-events = INFO akka.remote.dot-netty.connection-timeout = 25s akka.cluster.auto-down-unreachable-after = 10s akka.cluster.retry-unsuccessful-join-after = 3s akka.cluster.seed-node-timeout = 2s akka.cluster.shutdown-after-unsuccessful-join-seed-nodes = off akka.coordinated-shutdown.terminate-actor-system = on akka.extensions = [""Akka.Cluster.Tools.PublishSubscribe.DistributedPubSubExtensionProvider, Akka.Cluster.Tools""] ")) .WithFallback(MultiNodeClusterSpec.ClusterConfig()); }
public AdaptiveLoadBalancingRouterConfig() { Node1 = Role("node-1"); Node2 = Role("node-2"); Node3 = Role("node-3"); CommonConfig = DebugConfig(on: false) .WithFallback(ConfigurationFactory.ParseString(@" # Enable metrics extension in akka-cluster-metrics. akka.extensions=[""Akka.Cluster.Metrics.ClusterMetricsExtensionProvider, Akka.Cluster.Metrics""] akka.cluster.failure-detector.acceptable-heartbeat-pause = 10s # Use rapid metrics collection. akka.cluster.metrics { collector { sample-interval = 1s gossip-interval = 1s moving-average-half-life = 2s } } # Use metrics extension routing. akka.actor.deployment { /router3 = { router = cluster-metrics-adaptive-pool metrics-selector = cpu nr-of-instances = 9 } /router4 = { router = cluster-metrics-adaptive-pool metrics-selector = ""Akka.Cluster.Metrics.Tests.MultiNode.TestCustomMetricsSelector, Akka.Cluster.Metrics.Tests.MultiNode"" nr-of-instances = 10 cluster { enabled = on max-nr-of-instances-per-node = 2 } } } ")) .WithFallback(ClusterMetrics.DefaultConfig()) .WithFallback(MultiNodeClusterSpec.ClusterConfig()); }
public ClusterClientSpecConfig() { Client = Role("client"); First = Role("first"); Second = Role("second"); Third = Role("third"); Fourth = Role("fourth"); CommonConfig = ConfigurationFactory.ParseString(@" akka.loglevel = INFO akka.actor.provider = ""Akka.Cluster.ClusterActorRefProvider, Akka.Cluster"" akka.remote.log-remote-lifecycle-events = off akka.cluster.auto-down-unreachable-after = 0s akka.cluster.client.heartbeat-interval = 1s akka.cluster.client.acceptable-heartbeat-pause = 3s ").WithFallback(MultiNodeClusterSpec.ClusterConfig()); TestTransport = true; }
public UseRoleIgnoredSpecConfig() { First = Role("first"); Second = Role("second"); Third = Role("third"); CommonConfig = DebugConfig(false) .WithFallback(MultiNodeClusterSpec.ClusterConfig()); NodeConfig(new List <RoleName> { First }, new List <Config> { ConfigurationFactory.ParseString(@"akka.cluster.roles =[""a"", ""c""]") }); NodeConfig(new List <RoleName> { Second, Third }, new List <Config> { ConfigurationFactory.ParseString(@"akka.cluster.roles =[""b"", ""c""]") }); }
public ClusterShardingRememberEntitiesNewExtractorSpecConfig() { First = Role("first"); Second = Role("second"); Third = Role("third"); CommonConfig = DebugConfig(false) .WithFallback(ConfigurationFactory.ParseString(@" akka.actor { serializers { hyperion = ""Akka.Serialization.HyperionSerializer, Akka.Serialization.Hyperion"" } serialization-bindings { ""System.Object"" = hyperion } } akka.cluster.auto-down-unreachable-after = 0s akka.persistence.snapshot-store.plugin = ""akka.persistence.snapshot-store.inmem"" akka.persistence.journal.plugin = ""akka.persistence.journal.memory-journal-shared"" akka.persistence.journal.MemoryJournal { class = ""Akka.Persistence.Journal.MemoryJournal, Akka.Persistence"" plugin-dispatcher = ""akka.actor.default-dispatcher"" } akka.persistence.journal.memory-journal-shared { class = ""Akka.Cluster.Sharding.Tests.MemoryJournalShared, Akka.Cluster.Sharding.Tests.MultiNode"" plugin-dispatcher = ""akka.actor.default-dispatcher"" timeout = 5s } ")) .WithFallback(Sharding.ClusterSharding.DefaultConfig()) .WithFallback(Tools.Singleton.ClusterSingletonManager.DefaultConfig()) .WithFallback(MultiNodeClusterSpec.ClusterConfig()); var roleConfig = ConfigurationFactory.ParseString(@"akka.cluster.roles = [sharding]"); NodeConfig(new RoleName[] { Second, Third }, new Config[] { roleConfig }); }
public ClusterClientHandoverSpecConfig() { Client = Role("client"); First = Role("first"); Second = Role("second"); CommonConfig = ConfigurationFactory.ParseString(@" akka.loglevel = INFO akka.actor.provider = cluster akka.remote.log-remote-lifecycle-events = off akka.cluster.client { heartbeat-interval = 1d acceptable-heartbeat-pause = 1d reconnect-timeout = 3s refresh-contacts-interval = 1d } akka.test.filter-leeway = 10s ") .WithFallback(ClusterClientReceptionist.DefaultConfig()) .WithFallback(DistributedPubSub.DefaultConfig()) .WithFallback(MultiNodeClusterSpec.ClusterConfig()); }
public ShardedDaemonProcessSpecConfig() { First = Role("first"); Second = Role("second"); Third = Role("third"); CommonConfig = DebugConfig(false) .WithFallback(ConfigurationFactory.ParseString(@" akka.loglevel = INFO akka.cluster.sharded-daemon-process {{ sharding {{ # First is likely to be ignored as shard coordinator not ready retry-interval = 0.2s }} # quick ping to make test swift keep-alive-interval = 1s }} ")) .WithFallback(ClusterSharding.DefaultConfig()) .WithFallback(ClusterSingletonManager.DefaultConfig()) .WithFallback(MultiNodeClusterSpec.ClusterConfig()); }
public ClusterSingletonManagerSpecConfig() { Controller = Role("controller"); Observer = Role("observer"); First = Role("first"); Second = Role("second"); Third = Role("third"); Fourth = Role("fourth"); Fifth = Role("fifth"); Sixth = Role("sixth"); CommonConfig = ConfigurationFactory.ParseString(@" akka.loglevel = DEBUG akka.actor.provider = ""Akka.Cluster.ClusterActorRefProvider, Akka.Cluster"" akka.remote.log-remote-lifecycle-events = off akka.cluster.auto-down-unreachable-after = 0s ") .WithFallback(ClusterSingletonManager.DefaultConfig()) .WithFallback(MultiNodeClusterSpec.ClusterConfig()); NodeConfig(new[] { First, Second, Third, Fourth, Fifth, Sixth }, new[] { ConfigurationFactory.ParseString(@"akka.cluster.roles =[worker]") }); }
public ConsistentHashingRouterMultiNodeConfig() { First = Role("first"); Second = Role("second"); Third = Role("third"); CommonConfig = DebugConfig(false) .WithFallback(ConfigurationFactory.ParseString(@" common-router-settings = { router = consistent-hashing-pool cluster { enabled = on max-nr-of-instances-per-node = 2 max-total-nr-of-instances = 10 } } akka.actor.deployment { /router1 = ${common-router-settings} /router3 = ${common-router-settings} /router4 = ${common-router-settings} } ")) .WithFallback(MultiNodeClusterSpec.ClusterConfig()); }
public AggregateClusterTestConfig() { Seed = Role("seed"); Client = Role("client"); Worker = Role("worker"); CommonConfig = ConfigurationFactory.ParseString(@" akka.loglevel = INFO ") .WithFallback(MultiNodeLoggingConfig.LoggingConfig) .WithFallback(AkkatectureClusteringDefaultSettings.DefaultConfig()) .WithFallback(MultiNodeClusterSpec.ClusterConfig()); NodeConfig(new [] { Seed }, new [] { ConfigurationFactory.ParseString(@" akka.cluster.roles=[""seed""] akka.cluster.sharding.role = ""seed"" ") }); NodeConfig(new [] { Client }, new [] { ConfigurationFactory.ParseString(@" akka.cluster.roles=[""client""] akka.cluster.sharding.role = ""client"" ") }); NodeConfig(new [] { Worker }, new [] { ConfigurationFactory.ParseString(@" akka.cluster.roles=[""worker""] akka.cluster.sharding.role = ""worker"" ") }); }
public ClusterMetricsEnabledConfig() { CommonConfig = EnableMetricsExtension .WithFallback(DebugConfig(on: false)) .WithFallback(MultiNodeClusterSpec.ClusterConfigWithFailureDetectorPuppet()); }
public ClusterShardingSpecConfig(/*string entityRecoveryStrategy*/) { Controller = Role("controller"); First = Role("first"); Second = Role("second"); Third = Role("third"); Fourth = Role("fourth"); Fifth = Role("fifth"); Sixth = Role("sixth"); CommonConfig = DebugConfig(false) .WithFallback(ConfigurationFactory.ParseString(@" akka.actor { serializers { hyperion = ""Akka.Serialization.HyperionSerializer, Akka.Serialization.Hyperion"" } serialization-bindings { ""System.Object"" = hyperion } } akka.cluster.auto-down-unreachable-after = 0s akka.cluster.roles = [""backend""] akka.cluster.sharding { retry-interval = 1 s handoff-timeout = 10 s shard-start-timeout = 5s entity-restart-backoff = 1s rebalance-interval = 2 s entity-recovery-strategy = ""all"" entity-recovery-constant-rate-strategy { frequency = 1 ms number-of-entities = 1 } least-shard-allocation-strategy { rebalance-threshold = 2 max-simultaneous-rebalance = 1 } } akka.testconductor.barrier-timeout = 70s akka.persistence.snapshot-store.plugin = ""akka.persistence.snapshot-store.inmem"" akka.persistence.journal.plugin = ""akka.persistence.journal.memory-journal-shared"" akka.persistence.journal.MemoryJournal { class = ""Akka.Persistence.Journal.MemoryJournal, Akka.Persistence"" plugin-dispatcher = ""akka.actor.default-dispatcher"" } akka.persistence.journal.memory-journal-shared { class = ""Akka.Cluster.Sharding.Tests.MemoryJournalShared, Akka.Cluster.Sharding.Tests.MultiNode"" plugin-dispatcher = ""akka.actor.default-dispatcher"" timeout = 5s } ")) .WithFallback(Sharding.ClusterSharding.DefaultConfig()) .WithFallback(ClusterSingletonManager.DefaultConfig()) .WithFallback(MultiNodeClusterSpec.ClusterConfig()); NodeConfig(new[] { Sixth }, new[] { ConfigurationFactory.ParseString(@"akka.cluster.roles = [""frontend""]") }); }