public void RunConsumer(QueueConnection queueConnection, bool addInterceptors, ILogger logProvider, int runTime, int messageCount, int workerCount, int timeOut, Action <IContainer> badQueueAdditions, TimeSpan heartBeatTime, TimeSpan heartBeatMonitorTime, string updateTime, Guid id, bool enableChaos, ICreationScope scope) { _queueConnection = queueConnection; _workerCount = workerCount; _badQueueAdditions = badQueueAdditions; _updatetime = updateTime; _heartBeatTime = heartBeatTime; _heartBeatMonitorTime = heartBeatMonitorTime; _queue = CreateConsumerInternalThread(scope); var t = new Thread(RunBadQueue); t.Start(); if (enableChaos) { timeOut *= 2; } //run consumer RunConsumerInternal(queueConnection, addInterceptors, logProvider, runTime, messageCount, workerCount, timeOut, _queue, heartBeatTime, heartBeatMonitorTime, id, updateTime, enableChaos, scope); }
private void StartConsumer(IConsumerMethodQueue queue) { if (_queueStarted) { return; } lock (_queueStartLocker) { if (!_queueStarted) { queue.Start(); _queueStarted = true; } } }
public void RunConsumer(string queueName, string connectionString, bool addInterceptors, ILogProvider logProvider, int runTime, int messageCount, int workerCount, int timeOut, Action <IContainer> badQueueAdditions, TimeSpan heartBeatTime, TimeSpan heartBeatMonitorTime, string updateTime, Guid id) { _queueName = queueName; _connectionString = connectionString; _workerCount = workerCount; _badQueueAdditions = badQueueAdditions; _updatetime = updateTime; _heartBeatTime = heartBeatTime; _heartBeatMonitorTime = heartBeatMonitorTime; _queue = CreateConsumerInternalThread(); var t = new Thread(RunBadQueue); t.Start(); //run consumer RunConsumerInternal(queueName, connectionString, addInterceptors, logProvider, runTime, messageCount, workerCount, timeOut, _queue, heartBeatTime, heartBeatMonitorTime, id, updateTime); }