From 89c5addfe828f56eb27ac2b48b5932224c7251f7 Mon Sep 17 00:00:00 2001 From: espent1004 Date: Tue, 19 Nov 2019 22:39:48 +0100 Subject: [PATCH] FF --- .../EventBus/EventBus/Events/CustomisationEvent.cs | 2 ++ .../EventBus/EventBusRabbitMQ/EventBusRabbitMQ.cs | 1 - .../EventHandling/CustomisationEventHandler.cs | 3 +++ .../TenantCustomisations/TenantACustomisations/Program.cs | 2 +- .../TenantACustomisations/Services/ValidationService.cs | 5 ++--- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/BuildingBlocks/EventBus/EventBus/Events/CustomisationEvent.cs b/src/BuildingBlocks/EventBus/EventBus/Events/CustomisationEvent.cs index 38b1564a5..695aef7ea 100644 --- a/src/BuildingBlocks/EventBus/EventBus/Events/CustomisationEvent.cs +++ b/src/BuildingBlocks/EventBus/EventBus/Events/CustomisationEvent.cs @@ -10,9 +10,11 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events { TenantId = tenantId; this.@event = @event; + eventType = @event.GetType().Name; } public int TenantId { get; set; } public IntegrationEvent @event { get; set; } + public String eventType { get; set; } } } diff --git a/src/BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.cs b/src/BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.cs index 05af15cf6..be7b8abd2 100644 --- a/src/BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.cs +++ b/src/BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.cs @@ -257,7 +257,6 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ return channel; } - private async Task ProcessEvent(string eventName, string message) { _logger.LogWarning("Processing RabbitMQ event: {EventName}", eventName); diff --git a/src/Services/TenantCustomisations/TenantACustomisations/IntegrationEvents/EventHandling/CustomisationEventHandler.cs b/src/Services/TenantCustomisations/TenantACustomisations/IntegrationEvents/EventHandling/CustomisationEventHandler.cs index 990afa51c..57321418b 100644 --- a/src/Services/TenantCustomisations/TenantACustomisations/IntegrationEvents/EventHandling/CustomisationEventHandler.cs +++ b/src/Services/TenantCustomisations/TenantACustomisations/IntegrationEvents/EventHandling/CustomisationEventHandler.cs @@ -1,6 +1,7 @@ using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions; using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; using Microsoft.Extensions.Logging; +using Newtonsoft.Json; using Ordering.API.Application.IntegrationEvents.Events; using System; using System.Collections.Generic; @@ -39,6 +40,8 @@ namespace TenantACustomisations.IntegrationEvents.EventHandling } break; default: + integrationEvent.CheckForCustomisation = false; + _eventBus.Publish(integrationEvent); break; } } diff --git a/src/Services/TenantCustomisations/TenantACustomisations/Program.cs b/src/Services/TenantCustomisations/TenantACustomisations/Program.cs index 43b52f419..b3e34cf44 100644 --- a/src/Services/TenantCustomisations/TenantACustomisations/Program.cs +++ b/src/Services/TenantCustomisations/TenantACustomisations/Program.cs @@ -6,7 +6,7 @@ using Serilog; using System; using System.IO; -namespace Microsoft.eShopOnContainers.Services.Ordering.API +namespace Microsoft.eShopOnContainers.Services.TenantACustomisations { public class Program { diff --git a/src/Services/TenantCustomisations/TenantACustomisations/Services/ValidationService.cs b/src/Services/TenantCustomisations/TenantACustomisations/Services/ValidationService.cs index 618e9c257..9dbab5b24 100644 --- a/src/Services/TenantCustomisations/TenantACustomisations/Services/ValidationService.cs +++ b/src/Services/TenantCustomisations/TenantACustomisations/Services/ValidationService.cs @@ -1,9 +1,8 @@ -using System; +using Ordering.API.Application.IntegrationEvents.Events; +using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; -using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; -using Ordering.API.Application.IntegrationEvents.Events; namespace TenantACustomisations.Services {