Пример #1
0
        protected override void DoRun()
        {
            var transport = new AzureStorageQueuesTransport(GetStorageAccount(ConnectionStringName), InputQueue, LoggerFactory);

            var returnToSourceQueue = new ReturnToSourceQueue(transport)
            {
                DefaultOutputQueue = DefaultOutputQueue,
                InputQueue = InputQueue
            };

            returnToSourceQueue.Run();
        }
        public ITransport Create(string inputQueueAddress)
        {
            if (inputQueueAddress == null)
            {
                var transport = new AzureStorageQueuesTransport(AzureConfig.StorageAccount, null, new ConsoleLoggerFactory(false));

                transport.Initialize();

                return transport;
            }

            return _transports.GetOrAdd(inputQueueAddress, address =>
            {
                var transport = new AzureStorageQueuesTransport(AzureConfig.StorageAccount, inputQueueAddress, new ConsoleLoggerFactory(false));

                transport.PurgeInputQueue();

                transport.Initialize();

                return transport;
            });
        }