/// <summary> /// Starts the dequeuing of message using the specified <paramref name="maximumConcurrencyLevel" />. /// </summary> /// <param name="maximumConcurrencyLevel">Indicates the maximum concurrency level this <see cref="IDequeueMessages" /> is able to support.</param> public void Start(int maximumConcurrencyLevel) { this.tokenSource = new CancellationTokenSource(); this.scheduler = new MTATaskScheduler( maximumConcurrencyLevel, string.Format("NServiceBus Dequeuer Worker Thread for [{0}]", this.workQueue)); for (int i = 0; i < maximumConcurrencyLevel; i++) { this.StartThread(); } }