Open Source Web Application Framework for ASP.NET Core
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

59 lines
1.7 KiB

using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.EventBus.Distributed;
using Volo.Abp.EventBus.RabbitMq;
using Volo.Abp.Modularity;
using Volo.Abp.RabbitMQ;
namespace DistDemoApp
{
#if DISTDEMO_USE_MONGODB
[DependsOn(
typeof(DistDemoAppMongoDbInfrastructureModule),
typeof(AbpEventBusRabbitMqModule),
typeof(DistDemoAppSharedModule)
)]
#else
[DependsOn(
typeof(DistDemoAppEntityFrameworkCoreInfrastructureModule),
typeof(AbpEventBusRabbitMqModule),
typeof(DistDemoAppSharedModule)
)]
#endif
public class DistDemoAppEfCoreRabbitMqModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
#if DISTDEMO_USE_MONGODB
context.ConfigureDistDemoMongoInfrastructure();
#else
context.ConfigureDistDemoEntityFrameworkInfrastructure();
#endif
Configure<AbpDistributedEventBusOptions>(options =>
{
// options.Outboxes.Configure(config =>
// {
// config.UseDbContext<TodoDbContext>();
// });
//
// options.Inboxes.Configure(config =>
// {
// config.UseDbContext<TodoDbContext>();
// });
});
Configure<AbpRabbitMqOptions>(options =>
{
options.Connections.Default.HostName = "localhost";
});
Configure<AbpRabbitMqEventBusOptions>(options =>
{
options.ConnectionName = "Default";
options.ClientName = "DistDemoApp";
options.ExchangeName = "DistDemo";
});
}
}
}