Пример #1
0
        public EventStorePersistenceExtension(ExtendedActorSystem system)
        {
            system.Settings.InjectTopLevelFallback(EventStorePersistence.DefaultConfiguration());

            EventStoreJournalSettings  = new EventStoreJournalSettings(system.Settings.Config.GetConfig(EventStoreJournalSettings.ConfigPath));
            EventStoreSnapshotSettings = new EventStoreSnapshotSettings(system.Settings.Config.GetConfig(EventStoreSnapshotSettings.ConfigPath));
        }
Пример #2
0
        public EventStorePersistenceExtension(ExtendedActorSystem system)
        {
            system.Settings.InjectTopLevelFallback(EventStorePersistence.DefaultConfiguration());

            var persistence = system.Settings.Config.GetConfig("akka.persistence");

            TenantIdentifier           = persistence.GetString("tenant-identifier", string.Empty);
            EventStoreJournalSettings  = new EventStoreJournalSettings(system.Settings.Config.GetConfig(EventStoreJournalSettings.ConfigPath));
            EventStoreSnapshotSettings = new EventStoreSnapshotSettings(system.Settings.Config.GetConfig(EventStoreSnapshotSettings.ConfigPath));
        }
        public EventStorePersistence(ExtendedActorSystem system)
        {
            if (system == null)
            {
                throw new ArgumentNullException(nameof(system));
            }

            // Initialize fallback configuration defaults
            system.Settings.InjectTopLevelFallback(DefaultConfiguration());

            // Read config
            var journalConfig = system.Settings.Config.GetConfig("akka.persistence.journal.eventstore");

            JournalSettings = new EventStoreJournalSettings(journalConfig);
            var snapshotConfig = system.Settings.Config.GetConfig("akka.persistence.snapshot-store.eventstore");

            SnapshotStoreSettings = new EventStoreSnapshotSettings(snapshotConfig);
        }