public void ShouldParseDefaultJournalConfig()
        {
            var journalSettings =
                BigtableJournalSettings.Create(
                    ConfigurationFactory.ParseString(@"akka.persistence.journal.bigtable {
                        table-name = foo
                        family-name = bar
                    }").WithFallback(BigtablePersistence.DefaultConfig)
                    .GetConfig("akka.persistence.journal.bigtable"));

            Assert.Equal("foo", journalSettings.TableName);
            Assert.Equal("bar", journalSettings.FamilyName);
        }
Ejemplo n.º 2
0
        public override ShardingBigtablePersistence CreateExtension(ExtendedActorSystem system)
        {
            system.Settings.InjectTopLevelFallback(ShardingBigtablePersistence.DefaultConfig);

            var journalSettings =
                BigtableJournalSettings.Create(
                    system.Settings.Config.GetConfig("akka.persistence.journal.bigtable-sharding"));

            var snapshotSettings =
                BigtableSnapshotSettings.Create(
                    system.Settings.Config.GetConfig("akka.persistence.snapshot-store.bigtable-sharding"));

            var transportSerializationSetttings =
                BigtableTransportSerializationSettings.Create(
                    system.Settings.Config.GetConfig("akka.persistence.transport-serialization.bigtable"));

            return(new ShardingBigtablePersistence(journalSettings, snapshotSettings, transportSerializationSetttings));
        }
        public void BigtablePersistence_CustomJournalConfig_ShouldParseConfig()
        {
            var config = ConfigurationFactory.ParseString(
                @"akka.persistence.journal.bigtable {
                                table-name = bar
                                family-name = jalla
                            }
                             akka.persistence.journal.bigtable-sharding {
                                table-name = foo
                                family-name = baz
                            }")
                         .WithFallback(BigtablePersistence.DefaultConfig)
                         .WithFallback(ShardingBigtablePersistence.DefaultConfig);

            var journalSettings  = BigtableJournalSettings.Create(config.GetConfig("akka.persistence.journal.bigtable"));
            var shardingSettings = BigtableJournalSettings.Create(config.GetConfig("akka.persistence.journal.bigtable-sharding"));

            Assert.Equal("bar", journalSettings.TableName);
            Assert.Equal("foo", shardingSettings.TableName);
            Assert.Equal("jalla", journalSettings.FamilyName);
            Assert.Equal("baz", shardingSettings.FamilyName);
        }
Ejemplo n.º 4
0
 public BigtablePersistence(BigtableJournalSettings bigtableJournalSettings, BigtableSnapshotSettings bigtableSnapshotSettings, BigtableTransportSerializationSettings transportSerialization)
 {
     JournalSettings  = bigtableJournalSettings;
     SnapshotSettings = bigtableSnapshotSettings;
     TransportSerializationSetttings = transportSerialization;
 }
Ejemplo n.º 5
0
 public ShardingBigtablePersistence(
     BigtableJournalSettings bigtableJournalSettings,
     BigtableSnapshotSettings bigtableSnapshotSettings,
     BigtableTransportSerializationSettings transportSerialization) : base(bigtableJournalSettings, bigtableSnapshotSettings, transportSerialization)
 {
 }