Example #1
0
        static public void TestQModel()
        {
            QueueingModel pubQueue = new QueueingModel("AnalysisFarm", "AnalysisRequest", "localhost", "", "", "", "", 5);

            while (!Console.KeyAvailable)
            {
                if (pubQueue.QueueEmpty())
                {
                    pubQueue.PostTestMessages();
                }
            }
            pubQueue.CloseConnections();
        }
Example #2
0
        static void TestQModelRead()
        {
            QueueingModel subQueue = new QueueingModel(
                exchName, exchType, "QModel", "QModel", hostName, uid, pwd, port);

            while (!subQueue.QueueEmpty())
            {
                string gotOne = subQueue.ReadMessageAsString();
                if (ModelRequests.Contains(gotOne))
                {
                    ModelRequests.Remove(gotOne);
                }
            }
            subQueue.CloseConnections();
        }
Example #3
0
        static void Main(string[] args)
        {
            string hostName     = "localhost";
            string uid          = "guest";
            string pwd          = "guest";
            int    port         = 5672;
            string exchangeName = "refExch";
            int    messagesSent = 0;

            QueueingModel subQueue = new QueueingModel(exchangeName, "direct", "AnalysisFarm", "AnalysisRequest", "localhost", uid, pwd, port);

            while (!Console.KeyAvailable)
            {
                if (!subQueue.QueueEmpty())
                {
                    string gotOne = subQueue.ReadMessageAsString();
                    Console.WriteLine(gotOne);
                }
            }
            subQueue.CloseConnections();
        }
Example #4
0
 public bool CheckRead()
 {
     return(!queueClient.QueueEmpty());
 }