static AccountConfigurations EnsureAccounts(this ExposeSettings transportExtensions) { var settings = transportExtensions.GetSettings(); if (settings.TryGet <AccountConfigurations>(out var accounts)) { return(accounts); } accounts = new AccountConfigurations(); settings.Set(accounts); return(accounts); }
public static void ShouldCacheEntities(this ExposeSettings settings, bool cache) { settings.GetSettings().Set("ShouldCacheEntities", cache); }
/// <summary> /// Sets how to generate stream ids throughout /// Parameters: /// - Type of entity /// - bucket /// - id /// Returns: /// - stream id /// </summary> /// <param name="settings"></param> /// <param name="generator"></param> public static void SetStreamGenerator(this ExposeSettings settings, StreamIdGenerator generator) { settings.GetSettings().Set("StreamGenerator", generator); }
/// <summary> /// When we have a version conflict with the store we can try to resolve it automatically. This sets how many times we'll try /// Set to 0 to disable /// </summary> /// <param name="settings"></param> /// <param name="tries"></param> public static void MaxConflictResolves(this ExposeSettings settings, int tries) { settings.GetSettings().Set("MaxConflictResolves", tries); }
public static void SetProcessingParallelism(this ExposeSettings settings, Int32 Parallelism) { settings.GetSettings().Set("ProcessingParallelism", Parallelism); }
public static void WithExtraStats(this ExposeSettings settings, bool use) { settings.GetSettings().Set("ExtraStats", use); }
/// <summary> /// The maximum amount of messages to keep in memory waiting to be executed /// </summary> public static void MaxDelayed(this ExposeSettings settings, int max) { settings.GetSettings().Set("MaxDelayed", max); }
public static void SetReadSize(this ExposeSettings settings, int count) { settings.GetSettings().Set("ReadSize", count); }
public static void MaxProcessingQueueSize(this ExposeSettings settings, Int32 Size) { settings.GetSettings().Set("MaxQueueSize", Size); }
public static void EventDropIsFatal(this ExposeSettings settings, Boolean Fatal) { settings.GetSettings().Set("EventDropIsFatal", Fatal); }
public static void MaxEventRetries(this ExposeSettings settings, Int32 Max) { settings.GetSettings().Set("MaxRetries", Max); }
public static void ParallelHandlers(this ExposeSettings settings, Boolean Parrallel) { settings.GetSettings().Set("ParallelHandlers", Parrallel); }
public static void SetBucketsHandled(this ExposeSettings settings, Int32 Count) { settings.GetSettings().Set("BucketsHandled", Count); }
public static void SetBucketExpiration(this ExposeSettings settings, Int32 Seconds) { settings.GetSettings().Set("BucketExpiration", Seconds); }
public static void SetBucketHeartbeats(this ExposeSettings settings, Int32 Seconds) { settings.GetSettings().Set("BucketHeartbeats", Seconds); }
public static void PublishOobToBus(this ExposeSettings settings, bool useOobNsb) { settings.GetSettings().Set("UseNsbForOob", true); }
public static void SlowAlertThreshold(this ExposeSettings settings, int milliseconds) { settings.GetSettings().Set("SlowAlertThreshold", milliseconds); }
/// <summary> /// Sets the interval to flush delayed messages when using IDelayedChannel /// If you don't want to write every delayed event to ES each UOW set this /// * Should be set lowish - depending on your load /// </summary> public static void DelayedFlushInterval(this ExposeSettings settings, TimeSpan interval) { settings.GetSettings().Set("FlushInterval", interval); }
public static void EnableSlowAlerts(this ExposeSettings settings, bool expose) { settings.GetSettings().Set("SlowAlerts", expose); }
/// <summary> /// Delayed message expiration /// When messages are delayed for bulk processing, only let them sit for this amount of time before flushing to eventstore for someone else to process /// </summary> public static void DelayedExpiration(this ExposeSettings settings, TimeSpan expiration) { settings.GetSettings().Set("DelayedExpiration", expiration); }
/// <summary> /// Compress events and messages using GZip (default snapshots only) /// </summary> /// <param name="settings"></param> /// <param name="compress"></param> public static void SetCompress(this ExposeSettings settings, Compression compress) { settings.GetSettings().Set("Compress", compress); }
public static void ShardedStore(this ExposeSettings settings, IEventStoreConnection[] connections) { settings.GetSettings().Set("Shards", connections); }
public static void WithParallelEvents(this ExposeSettings settings, int concurrency) { settings.GetSettings().Set("ParallelEvents", concurrency); }
public static void SetHandlerParallelism(this ExposeSettings settings, Int32 Parallelism) { settings.GetSettings().Set("HandlerParallelism", Parallelism); }