public Subscription(string identity, IEnumerable<string> eventKeys, Func<MessageResult, Task<bool>> callback, int maxMessages, IPerformanceCounterWriter counters) { Identity = identity; _callback = callback; _maxMessages = maxMessages; EventKeys = eventKeys; MaxMessages = maxMessages; _subsTotalCounter = counters.GetCounter(PerformanceCounters.MessageBusSubscribersTotal); _subsCurrentCounter = counters.GetCounter(PerformanceCounters.MessageBusSubscribersCurrent); _subsPerSecCounter = counters.GetCounter(PerformanceCounters.MessageBusSubscribersPerSec); _subsTotalCounter.SafeIncrement(); _subsCurrentCounter.SafeIncrement(); _subsPerSecCounter.SafeIncrement(); }