Beispiel #1
0
        protected ClusterShardingFailureSpecConfig(string mode)
        {
            Mode       = mode;
            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.loglevel = INFO
                    akka.actor.provider = cluster
                    akka.remote.log-remote-lifecycle-events = off
                    akka.cluster.auto-down-unreachable-after = 0s
                    akka.cluster.roles = [""backend""]
                    akka.cluster.sharding {{
                        coordinator-failure-backoff = 3s
                        shard-failure-backoff = 3s
                        state-store-mode = ""{mode}""
                    }}
                    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.cluster.sharding.distributed-data.durable.lmdb {{
                        dir = ""target/ClusterShardingFailureSpec/sharding-ddata""
                        map-size = 10000000
                    }}
                    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.distributed-data.durable.lmdb {{
                      dir = ""target/ClusterShardingFailureSpec/sharding-ddata""
                      map-size = 10000000
                    }}"))
                           .WithFallback(Sharding.ClusterSharding.DefaultConfig())
                           .WithFallback(Tools.Singleton.ClusterSingletonManager.DefaultConfig())
                           .WithFallback(MultiNodeClusterSpec.ClusterConfig());

            TestTransport = true;
        }
        public ClusterConsistentHashingGroupSpecConfig()
        {
            _first  = Role("first");
            _second = Role("second");
            _third  = Role("third");

            CommonConfig = MultiNodeLoggingConfig.LoggingConfig.WithFallback(DebugConfig(false))
                           .WithFallback(ConfigurationFactory.ParseString(@"
                    akka.cluster.publish-stats-interval = 5s
                "))
                           .WithFallback(MultiNodeClusterSpec.ClusterConfig());
        }
        protected ClusterShardingRememberEntitiesSpecConfig(string mode, bool rememberEntities)
        {
            Mode             = mode;
            RememberEntities = rememberEntities;
            First            = Role("first");
            Second           = Role("second");
            Third            = Role("third");

            CommonConfig = DebugConfig(false)
                           .WithFallback(ConfigurationFactory.ParseString($@"
                    akka.actor {{
                        serializers {{
                            hyperion = ""Akka.Cluster.Sharding.Tests.MultiNode.HyperionSerializerWrapper, Akka.Cluster.Sharding.Tests.MultiNode""
                        }}
                        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.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(DistributedData.DistributedData.DefaultConfig())
                           .WithFallback(Tools.Singleton.ClusterSingletonManager.DefaultConfig())
                           .WithFallback(MultiNodeClusterSpec.ClusterConfig());

            NodeConfig(new[] { Third }, new[] { ConfigurationFactory.ParseString(@"
                akka.cluster.sharding.distributed-data.durable.lmdb {
                  # use same directory when starting new node on third (not used at same time)
                  dir = ""target/ShardingRememberEntitiesSpec/sharding-third""
                }
            ") });
        }
        public DistributedPubSubMediatorSpecConfig()
        {
            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.log-remote-lifecycle-events = off
                akka.cluster.auto-down-unreachable-after = 0s
                akka.cluster.pub-sub.max-delta-elements = 500
            ").WithFallback(MultiNodeClusterSpec.ClusterConfig());
        }
Beispiel #5
0
        public ClusterSingletonManagerStartupConfig()
        {
            var first  = Role("first");
            var second = Role("second");
            var third  = Role("third");

            CommonConfig = ConfigurationFactory.ParseString(@"
            akka.loglevel = DEBUG
            akka.actor.provider = ""Akka.Aluster.ClusterActorRefProvider, Akka.Cluster""
            akka.remote.log-remote-lifecycle-events = off
            akka.cluster.auto-down-unreachable-after = 0s")
                           .WithFallback(ClusterSingletonManager.DefaultConfig())
                           .WithFallback(MultiNodeClusterSpec.ClusterConfig());
        }
        public LeaseMajority5NodeSpecConfig()
        {
            Node1 = Role("node1");
            Node2 = Role("node2");
            Node3 = Role("node3");
            Node4 = Role("node4");
            Node5 = Role("node5");

            CommonConfig = ConfigurationFactory.ParseString(@"

                akka {
                    loglevel = INFO
                    cluster {
                        gossip-interval                     = 200 ms
                        leader-actions-interval             = 200 ms
                        periodic-tasks-initial-delay        = 300 ms
                        failure-detector.heartbeat-interval = 500 ms

                        downing-provider-class = ""Akka.Cluster.SBR.SplitBrainResolverProvider""
                        split-brain-resolver {
                            active-strategy = lease-majority
                            stable-after = 1.5s
                            lease-majority {
                                lease-implementation = test-lease
                                acquire-lease-delay-for-minority = 1s
                                release-after = 3s
                            }
                        }

                        run-coordinated-shutdown-when-down = off
                    }

                    actor.provider = cluster

                    test.filter-leeway = 10s
                }

                test-lease {
                    lease-class = ""Akka.Coordination.Tests.TestLease, Akka.Coordination.Tests""
                    heartbeat-interval = 1s
                    heartbeat-timeout = 120s
                    lease-operation-timeout = 3s
                }")
                           .WithFallback(MultiNodeLoggingConfig.LoggingConfig)
                           .WithFallback(DebugConfig(true))
                           .WithFallback(MultiNodeClusterSpec.ClusterConfig());

            TestTransport = true;
        }
Beispiel #7
0
        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 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());
        }
Beispiel #9
0
        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 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());
            }
Beispiel #11
0
        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 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;
        }
        public ClusterSingletonManagerLeave2SpecConfig()
        {
            First  = Role("first");
            Second = Role("second");
            Third  = Role("third");
            Fourth = Role("fourth");
            Fifth  = Role("fifth");

            CommonConfig = ConfigurationFactory.ParseString(@"
                akka.loglevel = INFO
                akka.actor.provider = ""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 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());
        }
Beispiel #15
0
        public ClusterSingletonManagerChaos2Config()
        {
            Controller = Role("controller");
            First      = Role("_config.First");
            Second     = Role("second");
            Third      = Role("third");
            Fourth     = Role("fourth");

            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(ClusterSingletonProxy.DefaultConfig())
                           .WithFallback(MultiNodeClusterSpec.ClusterConfig());
        }
        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 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 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;
        }
Beispiel #19
0
        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 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());
        }
Beispiel #21
0
        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 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 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 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 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 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 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""]") });
        }