Пример #1
0
        private static async Task<IBus> SetupBus()
        {
            string connectionString = ConfigurationManager.AppSettings["AzureConnectionString"];
            var pingReceiver = new PingReceiver();

            IBus bus = new BusBuilder()
                .Configure()
                .WithConnectionString(connectionString)
                .RegisterQueueProcessor(pingReceiver)
                .WithLogger(new ConsoleLogger())
                .Build();

            await bus.Start();

            return bus;
        }
Пример #2
0
        private static async Task<IBus> SetupBus()
        {
            string connectionString = ConfigurationManager.AppSettings["AzureConnectionString"];

            var subscriptionProcessor = new FirehoseReceiver();
            
            var bus = new BusBuilder()
                .Configure()
                .WithConnectionString(connectionString)
                .WithMaxConcurrentReceiverCallbacks(100)
                .RegisterSubscriptionProcessor(subscriptionProcessor)
                .WithLogger(new ConsoleLogger())
                .Build();


            await bus.Start();

            return bus;
        }