Exemplo n.º 1
0
        public DeadLetterReprocessorHost(GlobalOptions globals, DeadLetterReprocessorCliOptions cliOptions)
            : base(globals)
        {
            var deadLetterStore = new MongoDeadLetterStore(globals.MongoDatabases.DeadLetterStoreOptions, Globals.RabbitOptions.RabbitMqVirtualHost);

            _deadLetterQueueConsumer = new DeadLetterQueueConsumer(deadLetterStore, globals.DeadLetterReprocessorOptions);
            _deadLetterRepublisher   = new DeadLetterRepublisher(deadLetterStore, RabbitMqAdapter.GetModel("DeadLetterRepublisher"));

            _cliOptions = cliOptions;
        }
Exemplo n.º 2
0
        public void TestWaitAfterChannelClosed()
        {
            IModel model = _testAdapter.GetModel("TestConnection");

            model.ConfirmSelect();

            _testAdapter.Shutdown(RabbitMqAdapter.DefaultOperationTimeout);

            Assert.True(model.IsClosed);
            Assert.Throws <AlreadyClosedException>(() => model.WaitForConfirms());
        }