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