Browse Source

Resolved #760: Change RabbitMQ Eventbus configuration path

pull/765/head
Halil ibrahim Kalkan 8 years ago
parent
commit
994084edaf
  1. 5
      framework/src/Volo.Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/RabbitMq/AbpEventBusRabbitMqModule.cs
  2. 7
      framework/src/Volo.Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/RabbitMq/RabbitMqDistributedEventBus.cs
  3. 2
      framework/src/Volo.Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/RabbitMq/RabbitMqEventBusOptions.cs
  4. 2
      samples/MicroserviceDemo/applications/AuthServer.Host/AuthServerHostModule.cs
  5. 8
      samples/MicroserviceDemo/applications/AuthServer.Host/appsettings.json
  6. 2
      samples/MicroserviceDemo/microservices/BloggingService.Host/BloggingServiceHostModule.cs
  7. 8
      samples/MicroserviceDemo/microservices/BloggingService.Host/appsettings.json
  8. 2
      samples/MicroserviceDemo/microservices/IdentityService.Host/IdentityServiceHostModule.cs
  9. 8
      samples/MicroserviceDemo/microservices/IdentityService.Host/appsettings.json
  10. 2
      samples/MicroserviceDemo/microservices/ProductService.Host/ProductServiceHostModule.cs
  11. 8
      samples/MicroserviceDemo/microservices/ProductService.Host/appsettings.json
  12. 4
      samples/RabbitMqEventBus/App1/App1Module.cs
  13. 4
      samples/RabbitMqEventBus/App2/App2Module.cs

5
framework/src/Volo.Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/Distributed/RabbitMq/AbpEventBusRabbitMqModule.cs → 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<RabbitMqEventBusOptions>(configuration.GetSection("RabbitMqEventBus"));
Configure<RabbitMqEventBusOptions>(configuration.GetSection("RabbitMQ:EventBus"));
}
}
}

7
framework/src/Volo.Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/Distributed/RabbitMq/RabbitMqDistributedEventBus.cs → 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

2
framework/src/Volo.Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/Distributed/RabbitMq/RabbitMqEventBusOptions.cs → 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
{

2
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;

8
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": {

2
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;

8
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": {

2
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;

8
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": {

2
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;

8
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": {

4
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<RabbitMqDistributedEventBusOptions>(options =>
Configure<RabbitMqEventBusOptions>(options =>
{
options.ClientName = "TestApp1";
options.ExchangeName = "TestMessages";

4
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<RabbitMqDistributedEventBusOptions>(options =>
Configure<RabbitMqEventBusOptions>(options =>
{
options.ClientName = "TestApp2";
options.ExchangeName = "TestMessages";

Loading…
Cancel
Save