/// <summary> /// This fires in the rare event when the queue goes offline. The framework will then look for another queue /// This will simply soft restart the processor, which will point to the next available queue /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void ProcessorQueue_ProcessorQueueChanged(object sender, ProcessorQueueChangedEventArgs e) { //The queue have changed. restart the framework pointing to the new Queue ProcessorQueue.ProcessorQueueChanged -= new ProcessorQueue.ProcessorQueueEventHandler(ProcessorQueue_ProcessorQueueChanged); StopFramework(true); Thread.Sleep(10000); // Give the framework ten seconds to commit any transactions StopProcess = false; StartFramework(processorJob.JobName); }
protected virtual void OnProcessorQueueChanged(ProcessorQueueChangedEventArgs e) { if (ProcessorQueueChanged != null) ProcessorQueueChanged(this, e); }