public override void InitialiseBus() { var busConfig = new RawRabbitConfiguration { Username = "******", Password = "******", Port = 5672, VirtualHost = "/", PersistentDeliveryMode = true, Hostnames = { ConnectionString }, }; _busClient = BusClientFactory.CreateDefault(busConfig); }
public static IBusClient <MessageContext> getExtendableClient() { if (_extbusClient == null) { lock (_locker) { if (_extbusClient == null) { _extbusClient = RawRabbit.vNext.BusClientFactory.CreateDefault <MessageContext>(cfg => { cfg.SetBasePath(Directory.GetCurrentDirectory()).AddJsonFile("rawrabbit.json", optional: true, reloadOnChange: true); }, conf => { conf.AddSingleton <ILoggerFactory, LoggerFactory>().AddSingleton <IConfigurationEvaluator, AttributeConfigEvaluator>().AddSingleton(c => Conventions); }); } } } return(_extbusClient); }
public MessageHandlerExceptionTests() { _errorHandler = new Mock <IErrorHandlingStrategy>(); _client = TestClientFactory.CreateNormal(ioc => ioc.AddSingleton(c => _errorHandler.Object)); }
public void Dispose() { _busClient = null; _extbusClient = null; }
public MessageHandlerExceptionTests() { _errorHandler = new Mock<IErrorHandlingStrategy>(); _client = TestClientFactory.CreateNormal(ioc => ioc.AddSingleton(c => _errorHandler.Object)); }
private static void RegisterDependencies(RawRabbit.vNext.Disposable.IBusClient <AdvancedMessageContext> client, IServiceCollection service) { service.AddSingleton(client); service.AddTransient <TestSubscribeWorker>(); }