public SqlServerJournal(Config journalConfig) : base(journalConfig) { var config = journalConfig.WithFallback(Extension.DefaultJournalConfig); QueryExecutor = new SqlServerQueryExecutor(new QueryConfiguration( schemaName: config.GetString("schema-name"), journalEventsTableName: config.GetString("table-name"), metaTableName: config.GetString("metadata-table-name"), persistenceIdColumnName: "PersistenceId", sequenceNrColumnName: "SequenceNr", payloadColumnName: "Payload", manifestColumnName: "Manifest", timestampColumnName: "Timestamp", isDeletedColumnName: "IsDeleted", tagsColumnName: "Tags", orderingColumnName: "Ordering", timeout: config.GetTimeSpan("connection-timeout")), Context.System.Serialization, GetTimestampProvider(config.GetString("timestamp-provider"))); }
public SqlServerJournal(Config journalConfig) : base(journalConfig) { var config = journalConfig.WithFallback(Extension.DefaultJournalConfig); var connectionTimeoutSeconds = new SqlConnectionStringBuilder( config.GetString("connection-string")).ConnectTimeout; var commandTimeout = config.GetTimeSpan("connection-timeout", null); var circuitBreakerTimeout = journalConfig.GetTimeSpan( "circuit-breaker.call-timeout", null); var totalTimeout = commandTimeout.Add( TimeSpan.FromSeconds(connectionTimeoutSeconds)); if (totalTimeout >= circuitBreakerTimeout) { Log.Warning( "Configured Total of Connection timeout ({0} seconds) and Command timeout ({1} seconds) is greater than or equal to Circuit breaker timeout ({2} seconds). This may cause unintended write failures", connectionTimeoutSeconds, commandTimeout.TotalSeconds, circuitBreakerTimeout.TotalSeconds); } QueryExecutor = new SqlServerQueryExecutor(new QueryConfiguration( config.GetString("schema-name", null), config.GetString("table-name", null), config.GetString("metadata-table-name", null), "PersistenceId", "SequenceNr", "Payload", "Manifest", "Timestamp", "IsDeleted", "Tags", "Ordering", "SerializerId", config.GetTimeSpan("connection-timeout", null), config.GetString("serializer", null), config.GetBoolean("sequential-access", false)), Context.System.Serialization, GetTimestampProvider(config.GetString("timestamp-provider"))); }
public SqlServerJournal(Config journalConfig) : base(journalConfig) { var config = journalConfig.WithFallback(Extension.DefaultJournalConfig); QueryExecutor = new SqlServerQueryExecutor(new QueryConfiguration( config.GetString("schema-name"), config.GetString("table-name"), config.GetString("metadata-table-name"), "PersistenceId", "SequenceNr", "Payload", "Manifest", "Timestamp", "IsDeleted", "Tags", "Ordering", "SerializerId", config.GetTimeSpan("connection-timeout"), config.GetString("serializer"), config.GetBoolean("sequential-access")), Context.System.Serialization, GetTimestampProvider(config.GetString("timestamp-provider"))); }