admin/src/Oms.Application/OrderBatchMessagingServiceExtensions.cs
xiaolipro a4d6400318 refactor: 订单批量任务改走 Fake.EventBus.RabbitMQ
移除自建消费者与队列拓扑,统一由事件总线发布/消费,并优化下游转发查询与配置。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-20 17:54:29 +08:00

19 lines
826 B
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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