public QueueHandlerUsingMpsc(IHandle <Message> consumer, string name, QueueStatsManager queueStatsManager, bool watchSlowMsg = true, TimeSpan?slowMsgThreshold = null, TimeSpan?threadStopWaitTimeout = null, string groupName = null) : base( consumer, name, queueStatsManager, watchSlowMsg, slowMsgThreshold, threadStopWaitTimeout ?? DefaultStopWaitTimeout, groupName) { }
public static IQueuedHandler CreateQueuedHandler(IHandle <Message> consumer, string name, QueueStatsManager queueStatsManager, bool watchSlowMsg = true, TimeSpan?slowMsgThreshold = null, TimeSpan?threadStopWaitTimeout = null, string groupName = null) { //if (IntPtr.Size == 8) //{ // // optimized path, using much faster multi producer single consumer queue // return new QueueHandlerUsingMpsc(consumer, name, watchSlowMsg, slowMsgThreshold, threadStopWaitTimeout, // groupName); //} return(new QueuedHandler(consumer, name, queueStatsManager, watchSlowMsg, slowMsgThreshold, threadStopWaitTimeout, groupName)); }
public QueuedHandlerPulse(IHandle <Message> consumer, string name, QueueStatsManager queueStatsManager, bool watchSlowMsg = true, TimeSpan?slowMsgThreshold = null, TimeSpan?threadStopWaitTimeout = null, string groupName = null) { Ensure.NotNull(consumer, "consumer"); Ensure.NotNull(name, "name"); _consumer = consumer; _watchSlowMsg = watchSlowMsg; _slowMsgThreshold = slowMsgThreshold ?? InMemoryBus.DefaultSlowMessageThreshold; _threadStopWaitTimeout = threadStopWaitTimeout ?? QueuedHandler.DefaultStopWaitTimeout; _queueMonitor = QueueMonitor.Default; _queueStats = queueStatsManager.CreateQueueStatsCollector(name, groupName); }