public MessageLoggingTests()
        {
            var path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "log_endpoint.esent");
            if (Directory.Exists(path))
                Directory.Delete(path, true);

            container = new WindsorContainer();
            new RhinoServiceBusConfiguration()
                .UseCastleWindsor(container)
                .UseStandaloneConfigurationFile("RhinoFiles/RhinoFiles.config")
                .Configure();
            container.Register(Component.For<MessageLoggingModule>());

            messageSerializer = container.Resolve<IMessageSerializer>();
            queue = new QueueManager("localhost", path);
            queue.CreateQueues("log_endpoint");
            queue.Start();

            var innerTransport = container.Resolve<ITransport>();
            innerTransport.Start();
            transport = MockRepository.GenerateStub<ITransport>();
            transport.Stub(t => t.Send(null, null)).IgnoreArguments()
                .Do((Delegates.Action<Endpoint, object[]>)(innerTransport.Send));
        }
        private void ConfigureAndStartQueueManager(string endpoint)
        {
            _queueManager = new QueueManager(endpoint, _path, _queueManagerConfiguration);
            _queueManager.CreateQueues(_queueName);

            if (_enablePerformanceCounters)
                _queueManager.EnablePerformanceCounters();

            _queueManager.Start();
        }
Exemple #3
0
 public MessageAcceptance(QueueManager parent,
     IList<MessageBookmark> bookmarks,
     IEnumerable<Message> messages,
     QueueStorage queueStorage)
 {
     _parent = parent;
     _bookmarks = bookmarks;
     _messages = messages;
     _queueStorage = queueStorage;
     Interlocked.Increment(ref parent._currentlyInCriticalReceiveStatus);
 }