Beispiel #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));
        }
Beispiel #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 EventStoreSnapshotStore()
        {
            settings = EventStorePersistence.Get(Context.System).SnapshotStoreSettings;
            log      = Context.GetLogger();

            var serialization = Context.System.Serialization;

            serializer = serialization.FindSerializerForType(typeof(SelectedSnapshot));

            connection = EventStoreConnection.Create(settings.ConnectionString, settings.ConnectionName);
            connection.ConnectAsync().Wait();
        }
        public EventStoreJournal()
        {
            system   = Context.System;
            settings = EventStorePersistence.Get(Context.System).JournalSettings;
            log      = Context.GetLogger();

            serializerSettings = new JsonSerializerSettings
            {
                TypeNameHandling       = TypeNameHandling.Objects,
                TypeNameAssemblyFormat = FormatterAssemblyStyle.Simple,
                Formatting             = Formatting.Indented,
                Converters             =
                {
                    new ActorRefConverter(Context)
                }
            };

            var serialization = Context.System.Serialization;

            serializer = serialization.FindSerializerForType(typeof(SelectedSnapshot));

            connection = EventStoreConnection.Create("ConnectTo=tcp://admin:[email protected]:1113;", settings.ConnectionName);
            connection.ConnectAsync().Wait();
        }