This commit is contained in:
@@ -35,6 +35,7 @@ using IRaCIS.Core.Application.MassTransit.Command;
|
||||
using IRaCIS.Core.Application.MassTransit.Consumer;
|
||||
using DocumentFormat.OpenXml.InkML;
|
||||
using IRaCIS.Core.Domain;
|
||||
using MassTransit.Internals;
|
||||
|
||||
AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true);
|
||||
AppContext.SetSwitch("Npgsql.DisableDateTimeInfinityConversions", true);
|
||||
@@ -182,6 +183,10 @@ builder.Services.AddMassTransit(cfg =>
|
||||
//使用 Hangfire 进行消息调度
|
||||
cfg.UseHangfireScheduler();
|
||||
|
||||
cfg.UseConsumeFilter(typeof(CultureInfoFilter<>), context,
|
||||
x => x.Include(type => type.HasInterface(typeof(IConsumer<>))));
|
||||
|
||||
|
||||
// 这里可以进行额外的配置
|
||||
cfg.ConfigureEndpoints(context); // 自动配置所有消费者的端点
|
||||
|
||||
|
||||
Reference in New Issue
Block a user