From 994084edaf0a8917eee088f011addfdc2823279f Mon Sep 17 00:00:00 2001 From: Halil ibrahim Kalkan Date: Sun, 27 Jan 2019 17:05:27 +0300 Subject: [PATCH] Resolved #760: Change RabbitMQ Eventbus configuration path --- .../RabbitMq/AbpEventBusRabbitMqModule.cs | 5 ++--- .../RabbitMq/RabbitMqDistributedEventBus.cs | 7 ++++--- .../{Distributed => }/RabbitMq/RabbitMqEventBusOptions.cs | 2 +- .../applications/AuthServer.Host/AuthServerHostModule.cs | 2 +- .../applications/AuthServer.Host/appsettings.json | 8 ++++---- .../BloggingService.Host/BloggingServiceHostModule.cs | 2 +- .../microservices/BloggingService.Host/appsettings.json | 8 ++++---- .../IdentityService.Host/IdentityServiceHostModule.cs | 2 +- .../microservices/IdentityService.Host/appsettings.json | 8 ++++---- .../ProductService.Host/ProductServiceHostModule.cs | 2 +- .../microservices/ProductService.Host/appsettings.json | 8 ++++---- samples/RabbitMqEventBus/App1/App1Module.cs | 4 ++-- samples/RabbitMqEventBus/App2/App2Module.cs | 4 ++-- 13 files changed, 31 insertions(+), 31 deletions(-) rename framework/src/Volo.Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/{Distributed => }/RabbitMq/AbpEventBusRabbitMqModule.cs (74%) rename framework/src/Volo.Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/{Distributed => }/RabbitMq/RabbitMqDistributedEventBus.cs (99%) rename framework/src/Volo.Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/{Distributed => }/RabbitMq/RabbitMqEventBusOptions.cs (79%) diff --git a/framework/src/Volo.Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/Distributed/RabbitMq/AbpEventBusRabbitMqModule.cs b/framework/src/Volo.Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/RabbitMq/AbpEventBusRabbitMqModule.cs similarity index 74% rename from framework/src/Volo.Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/Distributed/RabbitMq/AbpEventBusRabbitMqModule.cs rename to framework/src/Volo.Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/RabbitMq/AbpEventBusRabbitMqModule.cs index aa191cf946..4fc74bddec 100644 --- a/framework/src/Volo.Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/Distributed/RabbitMq/AbpEventBusRabbitMqModule.cs +++ b/framework/src/Volo.Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/RabbitMq/AbpEventBusRabbitMqModule.cs @@ -2,8 +2,7 @@ using Volo.Abp.Modularity; using Volo.Abp.RabbitMQ; -//TODO: Rename Volo.Abp.EventBus.Distributed.RabbitMq namespace to Volo.Abp.EventBus.RabbitMq -namespace Volo.Abp.EventBus.Distributed.RabbitMq +namespace Volo.Abp.EventBus.RabbitMq { [DependsOn( typeof(AbpEventBusModule), @@ -14,7 +13,7 @@ namespace Volo.Abp.EventBus.Distributed.RabbitMq { var configuration = context.Services.GetConfiguration(); - Configure(configuration.GetSection("RabbitMqEventBus")); + Configure(configuration.GetSection("RabbitMQ:EventBus")); } } } diff --git a/framework/src/Volo.Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/Distributed/RabbitMq/RabbitMqDistributedEventBus.cs b/framework/src/Volo.Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/RabbitMq/RabbitMqDistributedEventBus.cs similarity index 99% rename from framework/src/Volo.Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/Distributed/RabbitMq/RabbitMqDistributedEventBus.cs rename to framework/src/Volo.Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/RabbitMq/RabbitMqDistributedEventBus.cs index 749113f22e..a8dd36f913 100644 --- a/framework/src/Volo.Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/Distributed/RabbitMq/RabbitMqDistributedEventBus.cs +++ b/framework/src/Volo.Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/RabbitMq/RabbitMqDistributedEventBus.cs @@ -4,13 +4,14 @@ using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Microsoft.Extensions.Options; -using Volo.Abp.DependencyInjection; -using Volo.Abp.RabbitMQ; using RabbitMQ.Client; using RabbitMQ.Client.Events; +using Volo.Abp.DependencyInjection; +using Volo.Abp.EventBus.Distributed; +using Volo.Abp.RabbitMQ; using Volo.Abp.Threading; -namespace Volo.Abp.EventBus.Distributed.RabbitMq +namespace Volo.Abp.EventBus.RabbitMq { /* TODO: How to handle unsubscribe to unbind on RabbitMq (may not be possible for) * TODO: Implement Retry system diff --git a/framework/src/Volo.Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/Distributed/RabbitMq/RabbitMqEventBusOptions.cs b/framework/src/Volo.Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/RabbitMq/RabbitMqEventBusOptions.cs similarity index 79% rename from framework/src/Volo.Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/Distributed/RabbitMq/RabbitMqEventBusOptions.cs rename to framework/src/Volo.Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/RabbitMq/RabbitMqEventBusOptions.cs index 7b7b95dc84..5a92a07869 100644 --- a/framework/src/Volo.Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/Distributed/RabbitMq/RabbitMqEventBusOptions.cs +++ b/framework/src/Volo.Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/RabbitMq/RabbitMqEventBusOptions.cs @@ -1,4 +1,4 @@ -namespace Volo.Abp.EventBus.Distributed.RabbitMq +namespace Volo.Abp.EventBus.RabbitMq { public class RabbitMqEventBusOptions { diff --git a/samples/MicroserviceDemo/applications/AuthServer.Host/AuthServerHostModule.cs b/samples/MicroserviceDemo/applications/AuthServer.Host/AuthServerHostModule.cs index 624f6108de..3d1112c760 100644 --- a/samples/MicroserviceDemo/applications/AuthServer.Host/AuthServerHostModule.cs +++ b/samples/MicroserviceDemo/applications/AuthServer.Host/AuthServerHostModule.cs @@ -6,7 +6,7 @@ using Volo.Abp.Account.Web; using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic; using Volo.Abp.AuditLogging.EntityFrameworkCore; using Volo.Abp.Authorization.Permissions; -using Volo.Abp.EventBus.Distributed.RabbitMq; +using Volo.Abp.EventBus.RabbitMq; using Volo.Abp.Autofac; using Volo.Abp.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore.SqlServer; diff --git a/samples/MicroserviceDemo/applications/AuthServer.Host/appsettings.json b/samples/MicroserviceDemo/applications/AuthServer.Host/appsettings.json index 56d019155e..17a9c1a1fe 100644 --- a/samples/MicroserviceDemo/applications/AuthServer.Host/appsettings.json +++ b/samples/MicroserviceDemo/applications/AuthServer.Host/appsettings.json @@ -5,15 +5,15 @@ "Redis": { "Configuration": "127.0.0.1" }, - "RabbitMqEventBus": { - "ClientName": "MsDemo_AuthServer", - "ExchangeName": "MsDemo" - }, "RabbitMQ": { "Connections": { "Default": { "HostName": "localhost" } + }, + "EventBus": { + "ClientName": "MsDemo_AuthServer", + "ExchangeName": "MsDemo" } }, "Logging": { diff --git a/samples/MicroserviceDemo/microservices/BloggingService.Host/BloggingServiceHostModule.cs b/samples/MicroserviceDemo/microservices/BloggingService.Host/BloggingServiceHostModule.cs index 3ad540a897..8c05240835 100644 --- a/samples/MicroserviceDemo/microservices/BloggingService.Host/BloggingServiceHostModule.cs +++ b/samples/MicroserviceDemo/microservices/BloggingService.Host/BloggingServiceHostModule.cs @@ -8,7 +8,7 @@ using Volo.Abp.AuditLogging.EntityFrameworkCore; using Volo.Abp.Autofac; using Volo.Abp.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore.SqlServer; -using Volo.Abp.EventBus.Distributed.RabbitMq; +using Volo.Abp.EventBus.RabbitMq; using Volo.Abp.Guids; using Volo.Abp.Localization; using Volo.Abp.Modularity; diff --git a/samples/MicroserviceDemo/microservices/BloggingService.Host/appsettings.json b/samples/MicroserviceDemo/microservices/BloggingService.Host/appsettings.json index acf1b9ac29..eaeebbc7c3 100644 --- a/samples/MicroserviceDemo/microservices/BloggingService.Host/appsettings.json +++ b/samples/MicroserviceDemo/microservices/BloggingService.Host/appsettings.json @@ -10,15 +10,15 @@ "Redis": { "Configuration": "127.0.0.1" }, - "RabbitMqEventBus": { - "ClientName": "MsDemo_BloggingService", - "ExchangeName": "MsDemo" - }, "RabbitMQ": { "Connections": { "Default": { "HostName": "localhost" } + }, + "EventBus": { + "ClientName": "MsDemo_BloggingService", + "ExchangeName": "MsDemo" } }, "Logging": { diff --git a/samples/MicroserviceDemo/microservices/IdentityService.Host/IdentityServiceHostModule.cs b/samples/MicroserviceDemo/microservices/IdentityService.Host/IdentityServiceHostModule.cs index fc05793b7b..2456bb53ce 100644 --- a/samples/MicroserviceDemo/microservices/IdentityService.Host/IdentityServiceHostModule.cs +++ b/samples/MicroserviceDemo/microservices/IdentityService.Host/IdentityServiceHostModule.cs @@ -6,7 +6,7 @@ using Volo.Abp.AuditLogging.EntityFrameworkCore; using Volo.Abp.Autofac; using Volo.Abp.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore.SqlServer; -using Volo.Abp.EventBus.Distributed.RabbitMq; +using Volo.Abp.EventBus.RabbitMq; using Volo.Abp.Identity; using Volo.Abp.Identity.EntityFrameworkCore; using Volo.Abp.Localization; diff --git a/samples/MicroserviceDemo/microservices/IdentityService.Host/appsettings.json b/samples/MicroserviceDemo/microservices/IdentityService.Host/appsettings.json index f3da2e06ad..19bf738cce 100644 --- a/samples/MicroserviceDemo/microservices/IdentityService.Host/appsettings.json +++ b/samples/MicroserviceDemo/microservices/IdentityService.Host/appsettings.json @@ -9,15 +9,15 @@ "Redis": { "Configuration": "127.0.0.1" }, - "RabbitMqEventBus": { - "ClientName": "MsDemo_IdentityService", - "ExchangeName": "MsDemo" - }, "RabbitMQ": { "Connections": { "Default": { "HostName": "localhost" } + }, + "EventBus": { + "ClientName": "MsDemo_IdentityService", + "ExchangeName": "MsDemo" } }, "Logging": { diff --git a/samples/MicroserviceDemo/microservices/ProductService.Host/ProductServiceHostModule.cs b/samples/MicroserviceDemo/microservices/ProductService.Host/ProductServiceHostModule.cs index 60d93ce198..545b4dde24 100644 --- a/samples/MicroserviceDemo/microservices/ProductService.Host/ProductServiceHostModule.cs +++ b/samples/MicroserviceDemo/microservices/ProductService.Host/ProductServiceHostModule.cs @@ -8,7 +8,7 @@ using Volo.Abp.AuditLogging.EntityFrameworkCore; using Volo.Abp.Autofac; using Volo.Abp.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore.SqlServer; -using Volo.Abp.EventBus.Distributed.RabbitMq; +using Volo.Abp.EventBus.RabbitMq; using Volo.Abp.Localization; using Volo.Abp.Modularity; using Volo.Abp.PermissionManagement.EntityFrameworkCore; diff --git a/samples/MicroserviceDemo/microservices/ProductService.Host/appsettings.json b/samples/MicroserviceDemo/microservices/ProductService.Host/appsettings.json index 4b66fabb2a..1bcfe310d7 100644 --- a/samples/MicroserviceDemo/microservices/ProductService.Host/appsettings.json +++ b/samples/MicroserviceDemo/microservices/ProductService.Host/appsettings.json @@ -10,15 +10,15 @@ "Redis": { "Configuration": "127.0.0.1" }, - "RabbitMqEventBus": { - "ClientName": "MsDemo_ProductService", - "ExchangeName": "MsDemo" - }, "RabbitMQ": { "Connections": { "Default": { "HostName": "localhost" } + }, + "EventBus": { + "ClientName": "MsDemo_ProductService", + "ExchangeName": "MsDemo" } }, "Logging": { diff --git a/samples/RabbitMqEventBus/App1/App1Module.cs b/samples/RabbitMqEventBus/App1/App1Module.cs index 6f608da57e..0aa34b5347 100644 --- a/samples/RabbitMqEventBus/App1/App1Module.cs +++ b/samples/RabbitMqEventBus/App1/App1Module.cs @@ -1,5 +1,5 @@ using Volo.Abp.Autofac; -using Volo.Abp.EventBus.Distributed.RabbitMq; +using Volo.Abp.EventBus.RabbitMq; using Volo.Abp.Modularity; namespace App1 @@ -12,7 +12,7 @@ namespace App1 { public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => + Configure(options => { options.ClientName = "TestApp1"; options.ExchangeName = "TestMessages"; diff --git a/samples/RabbitMqEventBus/App2/App2Module.cs b/samples/RabbitMqEventBus/App2/App2Module.cs index 9f81aa2d4c..2163a21544 100644 --- a/samples/RabbitMqEventBus/App2/App2Module.cs +++ b/samples/RabbitMqEventBus/App2/App2Module.cs @@ -1,5 +1,5 @@ using Volo.Abp.Autofac; -using Volo.Abp.EventBus.Distributed.RabbitMq; +using Volo.Abp.EventBus.RabbitMq; using Volo.Abp.Modularity; namespace App2 @@ -12,7 +12,7 @@ namespace App2 { public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => + Configure(options => { options.ClientName = "TestApp2"; options.ExchangeName = "TestMessages";