public PersistentQueues(ILogger logger, IDelayedMessageCache<MessageId> delayedMessages, LightningQueueSettings settings)
 {
     _logger = logger;
     _delayedMessages = delayedMessages;
     _queueManagerConfiguration = settings.ToConfiguration();
     _queueManagers = new Cache<int, QueueManager>(port => new QueueManager(new IPEndPoint(IPAddress.Any, port), EsentPath + "." + port, _queueManagerConfiguration));
 }
Пример #2
0
 public static QueueManagerConfiguration ToConfiguration(this LightningQueueSettings settings)
 {
     return(new QueueManagerConfiguration
     {
         EnableOutgoingMessageHistory = settings.EnableOutgoingMessageHistory,
         EnableProcessedMessageHistory = settings.EnableProcessedMessageHistory,
         NumberOfMessagesToKeepInOutgoingHistory = settings.NumberOfMessagesToKeepInOutgoingHistory,
         NumberOfMessagesToKeepInProcessedHistory = settings.NumberOfMessagesToKeepInProcessedHistory,
         NumberOfReceivedMessageIdsToKeep = settings.NumberOfReceivedMessageIdsToKeep,
         OldestMessageInOutgoingHistory = settings.OldestMessageInOutgoingHistory,
         OldestMessageInProcessedHistory = settings.OldestMessageInProcessedHistory,
     });
 }
 public LightningQueuesTransport(IPersistentQueues queues, LightningQueueSettings settings, IDelayedMessageCache<MessageId> delayedMessages)
 {
     _queues = queues;
     _settings = settings;
     _delayedMessages = delayedMessages;
 }
 public PersistentQueues(ILogger logger, IDelayedMessageCache <MessageId> delayedMessages, LightningQueueSettings settings)
 {
     _logger                    = logger;
     _delayedMessages           = delayedMessages;
     _queueManagerConfiguration = settings.ToConfiguration();
     _queueManagers             = new Cache <int, QueueManager>(port => new QueueManager(new IPEndPoint(IPAddress.Any, port), EsentPath + "." + port, _queueManagerConfiguration));
 }
 public LightningQueuesTransport(IPersistentQueues queues, LightningQueueSettings settings, IDelayedMessageCache <MessageId> delayedMessages)
 {
     _queues          = queues;
     _settings        = settings;
     _delayedMessages = delayedMessages;
 }