Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            var queueRequestThread = new Thread(() => new QueueListener(QueueConstants.REQUEST_QUEQUE, messageQueued =>
                {
                    var worker = new Worker();
                    worker.Procesar(messageQueued);

                }).Start());
            queueRequestThread.Start();

            var queueResponseThread = new Thread(() => new QueueListener(QueueConstants.RESPONSE_QUEQUE, messageQueued =>
                {
                    var worker = new Worker();
                    worker.Procesar(messageQueued);

                }).Start());
            queueResponseThread.Start();

            Console.WriteLine("SWITCH service started....");

            queueRequestThread.Join();
            queueResponseThread.Join();
        }
Ejemplo n.º 2
0
 public WorkerTests()
 {
     messageDataFactory = A.Fake<IMessageDataFactory>();
     dinamica = A.Fake<IDinamica>();
     worker = new Worker(messageDataFactory, dinamica);
 }