Exemplo n.º 1
0
        public static void Main(string[] args)
        {
            var settings = new ServiceBusSettings
            {
                Key          = "",
                NamespaceUrl = "",
                PolicyName   = "",
                QueueName    = ""
            };


            HowToPublish.Example(settings);
            HowToSubscribe.Example(settings);

            Console.WriteLine("This is just and example how to use");

            Console.ReadLine();
        }
        public static void Main(string[] args)
        {
            var rabbitMqSettings = new RabbitMqSubscriptionSettings
            {
                QueueName              = Environment.GetEnvironmentVariable("RabbitMqQueue"),
                ConnectionString       = Environment.GetEnvironmentVariable("RabbitMqConnectionString"),
                ExchangeName           = Environment.GetEnvironmentVariable("RabbitMqExchange"),
                DeadLetterExchangeName = Environment.GetEnvironmentVariable("RabbitMqExchange") + ".dead-letter"
            };

            HowToSubscribe.Example(rabbitMqSettings);
            HowToPublish.Example(rabbitMqSettings);

            Console.WriteLine("Working... Press Enter to stop");
            Console.ReadLine();

            Console.WriteLine("Stopping....");
            HowToSubscribe.Stop();
            Console.WriteLine("Stopped");
            Console.ReadLine();
        }