Example #1
0
        public QueueObserverClient(QueueClientOptions options)
        {
            if (options.AppType == AppKeys.Requestor)
            {
                tileClient = new QueueClient(options.ConnectionString, ServiceBusKeys.TileResult);

                analysisClient = new QueueClient(options.ConnectionString, ServiceBusKeys.AnalysisResult);
                RegisterOnMessageHandlerAndReceiveMessages();
            }
            else if (options.AppType == AppKeys.Responder)
            {
            }
            else
            {
                throw new NotSupportedException($"The Queue named: {options.AppType} is not supported.");
            }
        }
Example #2
0
        public AnalysisQueueClient(QueueClientOptions options)
        {
            analysisResponseClient = new QueueClient(options.ConnectionString, ServiceBusKeys.AnalysisQuery);

            if (options.AppType == AppKeys.Responder)
            {
                analysisResultClient = new QueueClient(options.ConnectionString, ServiceBusKeys.AnalysisResult);
                // Register QueueClient's MessageHandler and receive messages in a loop
                RegisterOnMessageHandlerAndReceiveMessages();
            }
            else if (options.AppType == AppKeys.Requestor)
            {
            }
            else
            {
                throw new NotSupportedException($"The Queue named: {options.AppType} is not supported.");
            }
        }