移除自建消费者与队列拓扑,统一由事件总线发布/消费,并优化下游转发查询与配置。 Co-authored-by: Cursor <cursoragent@cursor.com>
19 lines
826 B
C#
19 lines
826 B
C#
using Microsoft.Extensions.DependencyInjection;
|
||
using Microsoft.Extensions.Configuration;
|
||
using Oms.Application.Messaging;
|
||
|
||
namespace Oms.Application;
|
||
|
||
public static class OrderBatchMessagingServiceExtensions
|
||
{
|
||
public static IServiceCollection AddOmsOrderBatchMessaging(this IServiceCollection services, IConfiguration configuration)
|
||
{
|
||
services.Configure<OrderBatchRabbitMqOptions>(configuration.GetSection(OrderBatchRabbitMqOptions.SectionName));
|
||
services.AddSingleton<IOrderBatchJobPublisher, OrderBatchJobPublisher>();
|
||
services.AddSingleton<IOrderBatchQueueInspector, OrderBatchQueueInspector>();
|
||
// 消费端由 Fake.EventBus.RabbitMQ(RabbitMqEventBus HostedService)托管
|
||
services.AddHostedService<OrderBatchDlxMonitorHostedService>();
|
||
return services;
|
||
}
|
||
}
|