public override async Task Handle(SumRequestOverAnotherServiceRequestIntegrationEvent integrationEvent) { var sum = integrationEvent.V1 + integrationEvent.V2; Console.WriteLine($"RBS : Integration event {nameof(SumRequestOverAnotherServiceRequestIntegrationEvent)} triggered with parameters {integrationEvent.V1}, {integrationEvent.V2}, sum = {sum}"); await IntegrationEventService.PublishThroughEventBusAsync(new SumRequestOverAnotherServiceResponseIntegrationEvent { Sum = sum }); }
public async override Task Handle(CustomerProfileRequestIntegrationEvent integrationEvent) { if (integrationEvent.ProviderIdTokens.ContainsKey(Provider.NatwestInt.Value)) { var natWestIntBusinessLogic = _serviceProvider.GetRequiredService <NatWestIntBusinessLogic>(); var customerProfile = await natWestIntBusinessLogic.GetCustomerProfile(integrationEvent.ProviderIdTokens[Provider.NatwestInt.Value], integrationEvent.UserId); await IntegrationEventService.PublishThroughEventBusAsync(new CustomerProfileResponseIntegrationEvent { CustomerProfile = customerProfile }); } }