refactor: 拆分自动铺码服务为独立PrintWorker项目
1. 将原WorkService中的AutoDotCodeConsumer、RabbitMQHostedService、IQueueConsumer迁移至新的PrintWorker项目 2. 移除WorkService中冗余的PrintTool依赖文件复制配置 3. 将PrintToolV2.7相关资源移动到PrintWorker项目中统一管理 4. 从WorkService中移除AutoDotCodeConsumer的服务注册 5. 新增PrintWorker项目的完整宿主程序与配置文件
This commit is contained in:
@ -0,0 +1,32 @@
|
||||
namespace QYZH.InteractiveMagazine.PrintWorker.Consumers;
|
||||
|
||||
/// <summary>
|
||||
/// 队列消费者接口。
|
||||
/// </summary>
|
||||
public interface IQueueConsumer
|
||||
{
|
||||
/// <summary>
|
||||
/// 交换机名称。
|
||||
/// </summary>
|
||||
string Exchange { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 队列名称。
|
||||
/// </summary>
|
||||
string QueueName { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 路由键。
|
||||
/// </summary>
|
||||
string RoutingKey { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 处理消息。
|
||||
/// </summary>
|
||||
Task HandleAsync(byte[] message, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// 处理消费异常。
|
||||
/// </summary>
|
||||
Task OnErrorAsync(byte[] message, Exception exception);
|
||||
}
|
||||
Reference in New Issue
Block a user