예제 #1
0
        static void Main(string[] args)
        {
            RabbitMQConsumer client = new RabbitMQConsumer();

            client.CreateConnection();
            client.ProcessMessages();
        }
예제 #2
0
        public override bool OnStart()
        {
            // Set the maximum number of concurrent connections
            ServicePointManager.DefaultConnectionLimit = 12;

            // For information on handling configuration changes
            // see the MSDN topic at https://go.microsoft.com/fwlink/?LinkId=166357.

            bool result = base.OnStart();


            client = new RabbitMQConsumer(CloudConfigurationManager.GetSetting("monitoringBrokerExchangeName"),
                                          CloudConfigurationManager.GetSetting("monitoringBrokerQueueName"), new string[] { CloudConfigurationManager.GetSetting("monitoringKeysRouting") });

            client.CreateConnection();

            Trace.TraceInformation("ExternalConsultingWorker has been started");

            return(result);
        }