public SqsNotificationListener( SqsQueueBase queue, IMessageSerialisationRegister serialisationRegister, IMessageMonitor messagingMonitor, ILoggerFactory loggerFactory, Action <Exception, Amazon.SQS.Model.Message> onError = null, IMessageLock messageLock = null) { _queue = queue; _messagingMonitor = messagingMonitor; onError = onError ?? ((ex, message) => { }); _log = loggerFactory.CreateLogger("JustSaying"); _messageProcessingStrategy = new DefaultThrottledThroughput(_messagingMonitor); _messageHandlerWrapper = new MessageHandlerWrapper(messageLock, _messagingMonitor); _messageDispatcher = new MessageDispatcher(queue, serialisationRegister, messagingMonitor, onError, _handlerMap, loggerFactory); Subscribers = new Collection <ISubscriber>(); }