Exemplo n.º 1
0
        static void Process()
        {
            var ts = new TimeSpan(0, 0, 10);
            qc = new QueueConfig(ConfigurationSettings.AppSettings);
            q = new ReqMessageQueue(qc.queueName);
            qOut = new ReqMessageQueue(qc.queueOut);

            while (true)
            {
                try
                {
                    Message msg = q.Receive(ts);

                    HandleMessage(msg);
                }
                catch (MessageQueueException e)
                { // Test to see if this was just a timeout.
                    // If it was, just continue, there were no msgs waiting
                    // If it wasn't, something horrible may have happened }
                    Console.Out.WriteLine("error " + e.Message);
                }
            }
        }
Exemplo n.º 2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     QueueConfig qconfig = new QueueConfig(System.Configuration.ConfigurationSettings.AppSettings);
     qManager.LoadQueues(qconfig);
 }
Exemplo n.º 3
0
        public void LoadQueues(QueueConfig qc)
        {
            qConfiguration = qc;

             queueName = new ReqMessageQueue(qc.queueName);
             queueFileProcess = new ReqMessageQueue(qc.queueFileProcess);
             queuePrintBatch = new ReqMessageQueue(qc.queuePrintBatch);
             queueFileValidation = new ReqMessageQueue(qc.queueFileValidation);
             queueRequest = new ReqMessageQueue(qc.queueRequest);
             queueOut = new ReqMessageQueue(qc.queueOut);
        }