private JustSayingBus CreateBus(IMessagingConfig config, ILoggerFactory loggerFactory) { IMessageSerializationRegister register = ServicesBuilder?.SerializationRegister?.Invoke() ?? ServiceResolver.ResolveService <IMessageSerializationRegister>(); var bus = new JustSayingBus(config, register, loggerFactory); bus.Monitor = CreateMessageMonitor(); bus.MessageContextAccessor = CreateMessageContextAccessor(); if (ServicesBuilder?.MessageLock != null) { bus.MessageLock = ServicesBuilder.MessageLock(); } return(bus); }
private JustSayingFluently CreateFluent(JustSayingBus bus, ILoggerFactory loggerFactory) { IAwsClientFactoryProxy proxy = CreateFactoryProxy(); IVerifyAmazonQueues queueCreator = new AmazonQueueCreator(proxy, loggerFactory); var fluent = new JustSayingFluently(bus, queueCreator, proxy, loggerFactory); IMessageMonitor messageMonitor = CreateMessageMonitor(); IMessageContextAccessor messageContextAccessor = CreateMessageContextAccessor(); fluent.WithMonitoring(messageMonitor) .WithMessageContextAccessor(messageContextAccessor); if (ServicesBuilder?.MessageLock != null) { fluent.WithMessageLockStoreOf(ServicesBuilder.MessageLock()); } return(fluent); }