Changing implementation to not get the actualEventBus if it is system-wide event.
This commit is contained in:
parent
748a0596d3
commit
24949c2baf
@ -30,7 +30,8 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ
|
||||
eventBus.Publish(@event);
|
||||
});
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
//TODO requires ALL events to have tenantId set!
|
||||
_tenants.TryGetValue(@event.TenantId, out String tenantName);
|
||||
var actualEventBus = _eventBuses.Find(e => e.GetVHost().Equals(tenantName));
|
||||
@ -38,6 +39,8 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ
|
||||
actualEventBus.Publish(@event);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void Subscribe<T, TH>() where T : IntegrationEvent where TH : IIntegrationEventHandler<T>
|
||||
{
|
||||
_eventBuses.ForEach(e => { e.Subscribe<T, TH>(); });
|
||||
|
Loading…
x
Reference in New Issue
Block a user