From d940d9a65d08d025d38b095ce26f76df6039ba74 Mon Sep 17 00:00:00 2001 From: espent1004 Date: Tue, 4 Feb 2020 19:50:01 +0100 Subject: [PATCH] WIP --- .../EventBus/Abstractions/IEventBus.cs | 8 +- .../EventBus/Abstractions/IMultiEventBus.cs | 15 ++++ .../EventBus/IEventBusSubscriptionsManager.cs | 16 ++-- .../InMemoryEventBusSubscriptionsManager.cs | 90 +++++++++++-------- .../EventBusRabbitMQ/EventBusRabbitMQ.cs | 28 +++--- .../EventBusRabbitMQ/MultiEventBusRabbitMQ.cs | 36 ++++++++ src/Services/Basket/Basket.API/Startup.cs | 34 +++++-- src/Services/Catalog/Catalog.API/Startup.cs | 2 +- .../Location/Locations.API/Startup.cs | 2 +- .../Marketing/Marketing.API/Startup.cs | 2 +- src/Services/Ordering/Ordering.API/Startup.cs | 2 +- .../Ordering.BackgroundTasks/Startup.cs | 2 - .../Ordering/Ordering.SignalrHub/Startup.cs | 2 +- src/Services/Payment/Payment.API/Startup.cs | 2 +- .../TenantACustomisations/Startup.cs | 2 +- src/Services/Webhooks/Webhooks.API/Startup.cs | 2 +- 16 files changed, 166 insertions(+), 79 deletions(-) create mode 100644 src/BuildingBlocks/EventBus/EventBus/Abstractions/IMultiEventBus.cs create mode 100644 src/BuildingBlocks/EventBus/EventBusRabbitMQ/MultiEventBusRabbitMQ.cs diff --git a/src/BuildingBlocks/EventBus/EventBus/Abstractions/IEventBus.cs b/src/BuildingBlocks/EventBus/EventBus/Abstractions/IEventBus.cs index dde05e1e3..368629681 100644 --- a/src/BuildingBlocks/EventBus/EventBus/Abstractions/IEventBus.cs +++ b/src/BuildingBlocks/EventBus/EventBus/Abstractions/IEventBus.cs @@ -7,17 +7,17 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions { void Publish(IntegrationEvent @event); - void Subscribe() + void Subscribe(String vHost) where T : IntegrationEvent where TH : IIntegrationEventHandler; - void SubscribeDynamic(string eventName) + void SubscribeDynamic(string eventName, String vHost) where TH : IDynamicIntegrationEventHandler; - void UnsubscribeDynamic(string eventName) + void UnsubscribeDynamic(string eventName, String vHost) where TH : IDynamicIntegrationEventHandler; - void Unsubscribe() + void Unsubscribe(String vHost) where TH : IIntegrationEventHandler where T : IntegrationEvent; } diff --git a/src/BuildingBlocks/EventBus/EventBus/Abstractions/IMultiEventBus.cs b/src/BuildingBlocks/EventBus/EventBus/Abstractions/IMultiEventBus.cs new file mode 100644 index 000000000..4057b261e --- /dev/null +++ b/src/BuildingBlocks/EventBus/EventBus/Abstractions/IMultiEventBus.cs @@ -0,0 +1,15 @@ +using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; + +namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions +{ + public interface IMultiEventBus + { + void AddEventBus(IEventBus eventBus); + + void Publish(IntegrationEvent @event); + + void Subscribe() + where T : IntegrationEvent + where TH : IIntegrationEventHandler; + } +} \ No newline at end of file diff --git a/src/BuildingBlocks/EventBus/EventBus/IEventBusSubscriptionsManager.cs b/src/BuildingBlocks/EventBus/EventBus/IEventBusSubscriptionsManager.cs index c83c505b1..0c791816e 100644 --- a/src/BuildingBlocks/EventBus/EventBus/IEventBusSubscriptionsManager.cs +++ b/src/BuildingBlocks/EventBus/EventBus/IEventBusSubscriptionsManager.cs @@ -10,25 +10,25 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBus { bool IsEmpty { get; } event EventHandler OnEventRemoved; - void AddDynamicSubscription(string eventName) + void AddDynamicSubscription(string eventName, String vHost) where TH : IDynamicIntegrationEventHandler; - void AddSubscription() + void AddSubscription(String vHost) where T : IntegrationEvent where TH : IIntegrationEventHandler; - void RemoveSubscription() + void RemoveSubscription(String vHost) where TH : IIntegrationEventHandler where T : IntegrationEvent; - void RemoveDynamicSubscription(string eventName) + void RemoveDynamicSubscription(string eventName, String vHost) where TH : IDynamicIntegrationEventHandler; - bool HasSubscriptionsForEvent() where T : IntegrationEvent; - bool HasSubscriptionsForEvent(string eventName); + bool HasSubscriptionsForEvent(String vHost) where T : IntegrationEvent; + bool HasSubscriptionsForEvent(string eventName, String vHost); Type GetEventTypeByName(string eventName); void Clear(); - IEnumerable GetHandlersForEvent() where T : IntegrationEvent; - IEnumerable GetHandlersForEvent(string eventName); + IEnumerable GetHandlersForEvent(String vHost) where T : IntegrationEvent; + IEnumerable GetHandlersForEvent(string eventName, String vHost); string GetEventKey(); } } \ No newline at end of file diff --git a/src/BuildingBlocks/EventBus/EventBus/InMemoryEventBusSubscriptionsManager.cs b/src/BuildingBlocks/EventBus/EventBus/InMemoryEventBusSubscriptionsManager.cs index ea1aca61e..dee3add48 100644 --- a/src/BuildingBlocks/EventBus/EventBus/InMemoryEventBusSubscriptionsManager.cs +++ b/src/BuildingBlocks/EventBus/EventBus/InMemoryEventBusSubscriptionsManager.cs @@ -10,48 +10,52 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBus { - private readonly Dictionary> _handlers; + //private readonly Dictionary> _handlers; + private readonly Dictionary> _handlers; private readonly List _eventTypes; public event EventHandler OnEventRemoved; public InMemoryEventBusSubscriptionsManager() { - _handlers = new Dictionary>(); + //_handlers = new Dictionary>(); + _handlers = new Dictionary>(); _eventTypes = new List(); } public bool IsEmpty => !_handlers.Keys.Any(); public void Clear() => _handlers.Clear(); - public void AddDynamicSubscription(string eventName) + public void AddDynamicSubscription(string eventName, String vHost) where TH : IDynamicIntegrationEventHandler { - DoAddSubscription(typeof(TH), eventName, isDynamic: true); + DoAddSubscription(typeof(TH), eventName, isDynamic: true, vHost); } - public void AddSubscription() + public void AddSubscription(String vHost) where T : IntegrationEvent where TH : IIntegrationEventHandler { var eventName = GetEventKey(); - DoAddSubscription(typeof(TH), eventName, isDynamic: false); - + DoAddSubscription(typeof(TH), eventName, isDynamic: false, vHost); + if (!_eventTypes.Contains(typeof(T))) { _eventTypes.Add(typeof(T)); } } - private void DoAddSubscription(Type handlerType, string eventName, bool isDynamic) + private void DoAddSubscription(Type handlerType, string eventName, bool isDynamic, String vHost) { - if (!HasSubscriptionsForEvent(eventName)) + var compositeHandler = new CompositeHandler{TenantVHostName = vHost, EventName = eventName}; + + if (!HasSubscriptionsForEvent(eventName, vHost)) { - _handlers.Add(eventName, new List()); + _handlers.Add(compositeHandler, new List()); } - if (_handlers[eventName].Any(s => s.HandlerType == handlerType)) + if (_handlers[compositeHandler].Any(s => s.HandlerType == handlerType)) { throw new ArgumentException( $"Handler Type {handlerType.Name} already registered for '{eventName}'", nameof(handlerType)); @@ -59,41 +63,43 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBus if (isDynamic) { - _handlers[eventName].Add(SubscriptionInfo.Dynamic(handlerType)); + _handlers[compositeHandler].Add(SubscriptionInfo.Dynamic(handlerType)); } else { - _handlers[eventName].Add(SubscriptionInfo.Typed(handlerType)); + _handlers[compositeHandler].Add(SubscriptionInfo.Typed(handlerType)); } } - public void RemoveDynamicSubscription(string eventName) + public void RemoveDynamicSubscription(string eventName, String vHost) where TH : IDynamicIntegrationEventHandler { - var handlerToRemove = FindDynamicSubscriptionToRemove(eventName); - DoRemoveHandler(eventName, handlerToRemove); + var handlerToRemove = FindDynamicSubscriptionToRemove(eventName, vHost); + DoRemoveHandler(eventName, handlerToRemove, vHost); } - public void RemoveSubscription() + public void RemoveSubscription(String vHost) where TH : IIntegrationEventHandler where T : IntegrationEvent { - var handlerToRemove = FindSubscriptionToRemove(); + var handlerToRemove = FindSubscriptionToRemove(vHost); var eventName = GetEventKey(); - DoRemoveHandler(eventName, handlerToRemove); + DoRemoveHandler(eventName, handlerToRemove, vHost); } - private void DoRemoveHandler(string eventName, SubscriptionInfo subsToRemove) + private void DoRemoveHandler(string eventName, SubscriptionInfo subsToRemove, String vHost) { if (subsToRemove != null) { - _handlers[eventName].Remove(subsToRemove); - if (!_handlers[eventName].Any()) + + var compositeHandler = new CompositeHandler{EventName = eventName, TenantVHostName = vHost}; + _handlers[compositeHandler].Remove(subsToRemove); + if (!_handlers[compositeHandler].Any()) { - _handlers.Remove(eventName); + _handlers.Remove(compositeHandler); var eventType = _eventTypes.SingleOrDefault(e => e.Name == eventName); if (eventType != null) { @@ -105,12 +111,12 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBus } } - public IEnumerable GetHandlersForEvent() where T : IntegrationEvent + public IEnumerable GetHandlersForEvent(String vHost) where T : IntegrationEvent { var key = GetEventKey(); - return GetHandlersForEvent(key); + return GetHandlersForEvent(key, vHost); } - public IEnumerable GetHandlersForEvent(string eventName) => _handlers[eventName]; + public IEnumerable GetHandlersForEvent(string eventName, String vHost) => _handlers[new CompositeHandler{EventName = eventName, TenantVHostName = vHost}]; private void RaiseOnEventRemoved(string eventName) { @@ -119,38 +125,43 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBus } - private SubscriptionInfo FindDynamicSubscriptionToRemove(string eventName) + private SubscriptionInfo FindDynamicSubscriptionToRemove(string eventName, String vHost) where TH : IDynamicIntegrationEventHandler { - return DoFindSubscriptionToRemove(eventName, typeof(TH)); + return DoFindSubscriptionToRemove(eventName, typeof(TH), vHost); } - private SubscriptionInfo FindSubscriptionToRemove() + private SubscriptionInfo FindSubscriptionToRemove(String vHost) where T : IntegrationEvent where TH : IIntegrationEventHandler { var eventName = GetEventKey(); - return DoFindSubscriptionToRemove(eventName, typeof(TH)); + + return DoFindSubscriptionToRemove(eventName, typeof(TH), vHost); } - private SubscriptionInfo DoFindSubscriptionToRemove(string eventName, Type handlerType) + private SubscriptionInfo DoFindSubscriptionToRemove(string eventName, Type handlerType, String vHost) { - if (!HasSubscriptionsForEvent(eventName)) + + if (!HasSubscriptionsForEvent(eventName, vHost)) { return null; } + + var compositeHandler = new CompositeHandler{EventName = eventName, TenantVHostName = vHost}; - return _handlers[eventName].SingleOrDefault(s => s.HandlerType == handlerType); + return _handlers[compositeHandler].SingleOrDefault(s => s.HandlerType == handlerType); } - public bool HasSubscriptionsForEvent() where T : IntegrationEvent + public bool HasSubscriptionsForEvent(String vHost) where T : IntegrationEvent { var key = GetEventKey(); - return HasSubscriptionsForEvent(key); + + return HasSubscriptionsForEvent(key, vHost); } - public bool HasSubscriptionsForEvent(string eventName) => _handlers.ContainsKey(eventName); + public bool HasSubscriptionsForEvent(string eventName, String vHost) => _handlers.ContainsKey(new CompositeHandler{EventName = eventName, TenantVHostName = vHost}); public Type GetEventTypeByName(string eventName) => _eventTypes.SingleOrDefault(t => t.Name == eventName); @@ -160,3 +171,10 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBus } } } + + +class CompositeHandler +{ + public String TenantVHostName { get; set; } + public String EventName { get; set; } +} \ No newline at end of file diff --git a/src/BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.cs b/src/BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.cs index 5f68648d8..c9d148aaf 100644 --- a/src/BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.cs +++ b/src/BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.cs @@ -12,12 +12,8 @@ using RabbitMQ.Client; using RabbitMQ.Client.Events; using RabbitMQ.Client.Exceptions; using System; -using System.Collections; using System.Collections.Generic; -using System.Diagnostics; -using System.Net; using System.Net.Http; -using System.Net.Mime; using System.Net.Sockets; using System.Text; using System.Threading.Tasks; @@ -130,34 +126,34 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ } } - public void SubscribeDynamic(string eventName) + public void SubscribeDynamic(string eventName, String vHost) where TH : IDynamicIntegrationEventHandler { _logger.LogInformation("Subscribing to dynamic event {EventName} with {EventHandler}", eventName, typeof(TH).GetGenericTypeName()); - DoInternalSubscription(eventName); - _subsManager.AddDynamicSubscription(eventName); + DoInternalSubscription(eventName, vHost); + _subsManager.AddDynamicSubscription(eventName, vHost); StartBasicConsume(); } - public void Subscribe() + public void Subscribe(String vHost) where T : IntegrationEvent where TH : IIntegrationEventHandler { var eventName = _subsManager.GetEventKey(); - DoInternalSubscription(eventName); + DoInternalSubscription(eventName, vHost); _logger.LogInformation("Subscribing to event {EventName} with {EventHandler}", eventName, typeof(TH).GetGenericTypeName()); - _subsManager.AddSubscription(); + _subsManager.AddSubscription(vHost); StartBasicConsume(); } - private void DoInternalSubscription(string eventName) + private void DoInternalSubscription(string eventName, String vHost) { - var containsKey = _subsManager.HasSubscriptionsForEvent(eventName); + var containsKey = _subsManager.HasSubscriptionsForEvent(eventName, vHost); if (!containsKey) { if (!_persistentConnection.IsConnected) @@ -174,7 +170,7 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ } } - public void Unsubscribe() + public void Unsubscribe(String vHost) where T : IntegrationEvent where TH : IIntegrationEventHandler { @@ -182,13 +178,13 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ _logger.LogInformation("Unsubscribing from event {EventName}", eventName); - _subsManager.RemoveSubscription(); + _subsManager.RemoveSubscription(vHost); } - public void UnsubscribeDynamic(string eventName) + public void UnsubscribeDynamic(string eventName, String vHost) where TH : IDynamicIntegrationEventHandler { - _subsManager.RemoveDynamicSubscription(eventName); + _subsManager.RemoveDynamicSubscription(eventName, vHost); } public void Dispose() diff --git a/src/BuildingBlocks/EventBus/EventBusRabbitMQ/MultiEventBusRabbitMQ.cs b/src/BuildingBlocks/EventBus/EventBusRabbitMQ/MultiEventBusRabbitMQ.cs new file mode 100644 index 000000000..17e161c09 --- /dev/null +++ b/src/BuildingBlocks/EventBus/EventBusRabbitMQ/MultiEventBusRabbitMQ.cs @@ -0,0 +1,36 @@ +using System.Collections.Generic; +using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions; +using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; + +namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ +{ + public class MultiEventBusRabbitMQ : IMultiEventBus + { + + private List _eventBuses; + + public MultiEventBusRabbitMQ(List eventBuses) + { + _eventBuses = eventBuses; + } + + public void AddEventBus(IEventBus eventBus) + { + _eventBuses.Add(eventBus); + } + + public void Publish(IntegrationEvent @event) + { + + throw new System.NotImplementedException(); + } + + public void Subscribe() where T : IntegrationEvent where TH : IIntegrationEventHandler + { + _eventBuses.ForEach(e => + { + e.Subscribe(); + }); + } + } +} \ No newline at end of file diff --git a/src/Services/Basket/Basket.API/Startup.cs b/src/Services/Basket/Basket.API/Startup.cs index 20a8e1d20..731ae3d2c 100644 --- a/src/Services/Basket/Basket.API/Startup.cs +++ b/src/Services/Basket/Basket.API/Startup.cs @@ -120,7 +120,7 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API factory.Password = Configuration["EventBusPassword"]; } - factory.VirtualHost = "customisation"; + //factory.VirtualHost = "customisation"; var retryCount = 5; if (!string.IsNullOrEmpty(Configuration["EventBusRetryCount"])) @@ -138,7 +138,8 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API services.AddSingleton(sp => { IMultiRabbitMQPersistentConnections connections = new MultiRabbitMQPersistentConnections(); - connections.AddConnection(GenerateConnection("customisation", sp)); + connections.AddConnection(GenerateConnection("TenantA", sp)); + connections.AddConnection(GenerateConnection("TenantB", sp)); connections.AddConnection(GenerateConnection("/", sp)); return connections; @@ -338,7 +339,30 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API } else { - services.AddSingleton(sp => + + services.AddSingleton(sp => + { + var multiRabbitMqPersistentConnections = sp.GetRequiredService(); + var iLifetimeScope = sp.GetRequiredService(); + var logger = sp.GetRequiredService>(); + var eventBusSubcriptionsManager = sp.GetRequiredService(); + + var retryCount = 5; + if (!string.IsNullOrEmpty(Configuration["EventBusRetryCount"])) + { + retryCount = int.Parse(Configuration["EventBusRetryCount"]); + } + List eventBuses = new List(); + + multiRabbitMqPersistentConnections.GetConnections().ForEach(conn => + { + eventBuses.Add(new EventBusRabbitMQ(conn, logger, iLifetimeScope, eventBusSubcriptionsManager, subscriptionClientName, retryCount)); + }); + + return new MultiEventBusRabbitMQ(eventBuses); + }); + + /* services.AddSingleton(sp => { var rabbitMQPersistentConnection = sp.GetRequiredService(); var iLifetimeScope = sp.GetRequiredService(); @@ -363,7 +387,7 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API Console.WriteLine(testing); return new EventBusRabbitMQ(rabbitMQPersistentConnection, logger, iLifetimeScope, eventBusSubcriptionsManager, subscriptionClientName, retryCount); - }); + });*/ } @@ -375,7 +399,7 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API private void ConfigureEventBus(IApplicationBuilder app) { - var eventBus = app.ApplicationServices.GetRequiredService(); + var eventBus = app.ApplicationServices.GetRequiredService(); eventBus.Subscribe(); eventBus.Subscribe(); diff --git a/src/Services/Catalog/Catalog.API/Startup.cs b/src/Services/Catalog/Catalog.API/Startup.cs index e619aaf07..36abdc927 100644 --- a/src/Services/Catalog/Catalog.API/Startup.cs +++ b/src/Services/Catalog/Catalog.API/Startup.cs @@ -311,7 +311,7 @@ namespace Microsoft.eShopOnContainers.Services.Catalog.API factory.Password = configuration["EventBusPassword"]; } - factory.VirtualHost = "customisation"; + //factory.VirtualHost = "customisation"; var retryCount = 5; if (!string.IsNullOrEmpty(configuration["EventBusRetryCount"])) diff --git a/src/Services/Location/Locations.API/Startup.cs b/src/Services/Location/Locations.API/Startup.cs index bf9b1a700..71ebf1fa7 100644 --- a/src/Services/Location/Locations.API/Startup.cs +++ b/src/Services/Location/Locations.API/Startup.cs @@ -91,7 +91,7 @@ namespace Microsoft.eShopOnContainers.Services.Locations.API factory.Password = Configuration["EventBusPassword"]; } - factory.VirtualHost = "customisation"; + //factory.VirtualHost = "customisation"; var retryCount = 5; if (!string.IsNullOrEmpty(Configuration["EventBusRetryCount"])) diff --git a/src/Services/Marketing/Marketing.API/Startup.cs b/src/Services/Marketing/Marketing.API/Startup.cs index 156edf98a..9db283bb5 100644 --- a/src/Services/Marketing/Marketing.API/Startup.cs +++ b/src/Services/Marketing/Marketing.API/Startup.cs @@ -115,7 +115,7 @@ factory.Password = Configuration["EventBusPassword"]; } - factory.VirtualHost = "customisation"; + // factory.VirtualHost = "customisation"; var retryCount = 5; if (!string.IsNullOrEmpty(Configuration["EventBusRetryCount"])) diff --git a/src/Services/Ordering/Ordering.API/Startup.cs b/src/Services/Ordering/Ordering.API/Startup.cs index bd242274d..e3852dac8 100644 --- a/src/Services/Ordering/Ordering.API/Startup.cs +++ b/src/Services/Ordering/Ordering.API/Startup.cs @@ -319,7 +319,7 @@ factory.Password = configuration["EventBusPassword"]; } - factory.VirtualHost = "customisation"; + //factory.VirtualHost = "customisation"; var retryCount = 5; diff --git a/src/Services/Ordering/Ordering.BackgroundTasks/Startup.cs b/src/Services/Ordering/Ordering.BackgroundTasks/Startup.cs index d0f661299..4da64452d 100644 --- a/src/Services/Ordering/Ordering.BackgroundTasks/Startup.cs +++ b/src/Services/Ordering/Ordering.BackgroundTasks/Startup.cs @@ -82,8 +82,6 @@ namespace Ordering.BackgroundTasks factory.Password = Configuration["EventBusPassword"]; } - factory.VirtualHost = "customisation"; - var retryCount = 5; if (!string.IsNullOrEmpty(Configuration["EventBusRetryCount"])) { diff --git a/src/Services/Ordering/Ordering.SignalrHub/Startup.cs b/src/Services/Ordering/Ordering.SignalrHub/Startup.cs index ce283428d..f69ac78f3 100644 --- a/src/Services/Ordering/Ordering.SignalrHub/Startup.cs +++ b/src/Services/Ordering/Ordering.SignalrHub/Startup.cs @@ -94,7 +94,7 @@ namespace Ordering.SignalrHub factory.Password = Configuration["EventBusPassword"]; } - factory.VirtualHost = "customisation"; + //factory.VirtualHost = "customisation"; var retryCount = 5; if (!string.IsNullOrEmpty(Configuration["EventBusRetryCount"])) diff --git a/src/Services/Payment/Payment.API/Startup.cs b/src/Services/Payment/Payment.API/Startup.cs index 82bee3955..1e0a35e42 100644 --- a/src/Services/Payment/Payment.API/Startup.cs +++ b/src/Services/Payment/Payment.API/Startup.cs @@ -72,7 +72,7 @@ namespace Payment.API factory.Password = Configuration["EventBusPassword"]; } - factory.VirtualHost = "customisation"; + // factory.VirtualHost = "customisation"; var retryCount = 5; if (!string.IsNullOrEmpty(Configuration["EventBusRetryCount"])) diff --git a/src/Services/TenantCustomisations/TenantACustomisations/Startup.cs b/src/Services/TenantCustomisations/TenantACustomisations/Startup.cs index 19521e8b3..f99fc8be0 100644 --- a/src/Services/TenantCustomisations/TenantACustomisations/Startup.cs +++ b/src/Services/TenantCustomisations/TenantACustomisations/Startup.cs @@ -311,7 +311,7 @@ factory.Password = configuration["EventBusPassword"]; } - factory.VirtualHost = "customisation"; + //factory.VirtualHost = "customisation"; var retryCount = 5; if (!string.IsNullOrEmpty(configuration["EventBusRetryCount"])) diff --git a/src/Services/Webhooks/Webhooks.API/Startup.cs b/src/Services/Webhooks/Webhooks.API/Startup.cs index eb357ce1e..8599657f9 100644 --- a/src/Services/Webhooks/Webhooks.API/Startup.cs +++ b/src/Services/Webhooks/Webhooks.API/Startup.cs @@ -336,7 +336,7 @@ namespace Webhooks.API factory.Password = configuration["EventBusPassword"]; } - factory.VirtualHost = "customisation"; + //factory.VirtualHost = "customisation"; var retryCount = 5; if (!string.IsNullOrEmpty(configuration["EventBusRetryCount"]))