public void SetUp() { Builder = new FuncBuilder(); InMemoryFaultManager = new NServiceBus.Faults.InMemory.FaultManager(); TransportBuilder = new FakeTransportBuilder(); Configure.With(new Assembly[0]); Configure.Instance.Builder = Builder; RegisterTypes(); Builder.Register <IManageMessageFailures>(() => InMemoryFaultManager); var configurer = new SatelliteConfigurer(); configurer.Init(); //configurer.Run(); var launcher = new NonThreadingSatelliteLauncher { Builder = Builder, TransportBuilder = TransportBuilder }; BeforeRun(); launcher.Run(); }
public void SetUp() { Builder = new FuncBuilder(); InMemoryFaultManager = new Faults.InMemory.FaultManager(); FakeReceiver = new FakeReceiver(); Transport = new TransportReceiver { Receiver = FakeReceiver, TransactionSettings = TransactionSettings.Default }; Configure.With(new Assembly[0]) .DefineEndpointName("Test") .DefaultBuilder(); Configure.Instance.Builder = Builder; RegisterTypes(); Builder.Register<IManageMessageFailures>(() => InMemoryFaultManager); Builder.Register<TransportReceiver>(() => Transport); var configurer = new SatelliteConfigurer(); configurer.Init(); var launcher = new SatelliteLauncher(); BeforeRun(); launcher.Start(); }
public void SetUp() { Builder = new FuncBuilder(); InMemoryFaultManager = new NServiceBus.Faults.InMemory.FaultManager(); TransportBuilder = new FakeTransportBuilder(); Configure.With(new Assembly[0]); Configure.Instance.Builder = Builder; RegisterTypes(); Builder.Register<IManageMessageFailures>(() => InMemoryFaultManager); var configurer = new SatelliteConfigurer(); configurer.Init(); //configurer.Run(); var launcher = new NonThreadingSatelliteLauncher { Builder = Builder, TransportBuilder = TransportBuilder }; BeforeRun(); launcher.Run(); }
public void SetUp() { Builder = new FuncBuilder(); InMemoryFaultManager = new Faults.InMemory.FaultManager(); FakeReceiver = new FakeReceiver(); var configurationBuilder = new BusConfiguration(); configurationBuilder.EndpointName("xyz"); configurationBuilder.AssembliesToScan(new Assembly[0]); Transport = new TransportReceiver(new TransactionSettings(true, TimeSpan.FromSeconds(30), IsolationLevel.ReadCommitted, 5, false, false), 1, 0, FakeReceiver, InMemoryFaultManager, new SettingsHolder(), configurationBuilder.BuildConfiguration()); RegisterTypes(); Builder.Register <IManageMessageFailures>(() => InMemoryFaultManager); Builder.Register <TransportReceiver>(() => Transport); //var configurer = new SatelliteConfigurer(); //configurer.Customize(configure); var launcher = new SatelliteLauncher(Builder); BeforeRun(); launcher.Start(); }
public void SetUp() { Builder = new FuncBuilder(); InMemoryFaultManager = new Faults.InMemory.FaultManager(); FakeReceiver = new FakeReceiver(); Transport = new TransportReceiver { Receiver = FakeReceiver, TransactionSettings = TransactionSettings.Default }; Configure.With(new Assembly[0]) .DefineEndpointName("Test") .DefaultBuilder(); Configure.Instance.Builder = Builder; RegisterTypes(); Builder.Register <IManageMessageFailures>(() => InMemoryFaultManager); Builder.Register <TransportReceiver>(() => Transport); var configurer = new SatelliteConfigurer(); configurer.Init(); var launcher = new SatelliteLauncher { Builder = Builder, }; BeforeRun(); launcher.Start(); }
public FirstLevelRetries(int maxRetries, IManageMessageFailures failureManager, CriticalError criticalError, BusNotifications busNotifications) { this.maxRetries = maxRetries; this.failureManager = failureManager; this.criticalError = criticalError; notifications = busNotifications; }
public void SetUp() { Builder = new FuncBuilder(); InMemoryFaultManager = new NServiceBus.Faults.InMemory.FaultManager(); FakeReceiver = new FakeReceiver(); var configurationBuilder = new BusConfiguration(); configurationBuilder.EndpointName("xyz"); configurationBuilder.AssembliesToScan(new Assembly[0]); Transport = new TransportReceiver(new TransactionSettings(true, TimeSpan.FromSeconds(30), IsolationLevel.ReadCommitted, 5, false, false), 1, 0, FakeReceiver, InMemoryFaultManager, new SettingsHolder(), configurationBuilder.BuildConfiguration()); RegisterTypes(); Builder.Register<IManageMessageFailures>(() => InMemoryFaultManager); Builder.Register<TransportReceiver>(() => Transport); //var configurer = new SatelliteConfigurer(); //configurer.Customize(configure); var launcher = new SatelliteLauncher(Builder); BeforeRun(); launcher.Start(); }
public void SetUp() { fakeSender = new FakeSender(); var settingsHolder = new SettingsHolder(); faultManager = new FaultManager(fakeSender, new Configure(settingsHolder, new FakeContainer(), new List <Action <IConfigureComponents> >(), null), new BusNotifications()); faultManager.Init(new Address("fake", "fake")); }
public ManageMessageFailuresWithoutSlr(IManageMessageFailures mainFailureManager) { var mainTransportFailureManager = mainFailureManager as Faults.Forwarder.FaultManager; if (mainTransportFailureManager != null) { errorQueue = mainTransportFailureManager.ErrorQueue; } }
public ManageMessageFailuresWithoutSlr(IManageMessageFailures mainFailureManager, ISendMessages messageSender, Configure config) { this.messageSender = messageSender; this.config = config; var mainTransportFailureManager = mainFailureManager as Faults.Forwarder.FaultManager; if (mainTransportFailureManager != null) { errorQueue = mainTransportFailureManager.ErrorQueue; } }
/// <summary> /// Creates an instance of <see cref="TransportReceiver"/> /// </summary> /// <param name="transactionSettings">The transaction settings to use for this <see cref="TransportReceiver"/>.</param> /// <param name="maximumConcurrencyLevel">The maximum number of messages to process in parallel.</param> /// <param name="maximumThroughput">The maximum throughput per second, 0 means unlimited.</param> /// <param name="receiver">The <see cref="IDequeueMessages"/> instance to use.</param> /// <param name="manageMessageFailures">The <see cref="IManageMessageFailures"/> instance to use.</param> /// <param name="settings">The current settings</param> /// <param name="config">Configure instance</param> public TransportReceiver(TransactionSettings transactionSettings, int maximumConcurrencyLevel, int maximumThroughput, IDequeueMessages receiver, IManageMessageFailures manageMessageFailures, ReadOnlySettings settings, Configure config) { this.settings = settings; this.config = config; TransactionSettings = transactionSettings; MaximumConcurrencyLevel = maximumConcurrencyLevel; MaximumMessageThroughputPerSecond = maximumThroughput; FailureManager = manageMessageFailures; Receiver = receiver; }
public CustomFaultManager() { faultManager = new FaultManager(); ((FaultManager)faultManager).ErrorQueue = ConfigureFaultsForwarder.ErrorQueue; }
public FirstLevelRetries(int maxRetries, IManageMessageFailures failureManager, CriticalError criticalError) { this.maxRetries = maxRetries; this.failureManager = failureManager; this.criticalError = criticalError; }
public FirstLevelRetries(int maxRetries, IManageMessageFailures failureManager) { this.maxRetries = maxRetries; this.failureManager = failureManager; }