2026-06-11 17:01:24 +08:00
|
|
|
|
using RabbitMQ.Client;
|
|
|
|
|
|
using RabbitMQ.Client.Events;
|
|
|
|
|
|
|
|
|
|
|
|
namespace QYZH.InteractiveMagazine.Infrastructure.RabbitMQ
|
|
|
|
|
|
{
|
|
|
|
|
|
public interface IRabbitMQService
|
|
|
|
|
|
{
|
|
|
|
|
|
Task<bool> SendAsync(RabbitMQSendParam param, CancellationToken cancellationToken = default);
|
|
|
|
|
|
|
|
|
|
|
|
Task<bool> SendBatchAsync(IEnumerable<RabbitMQSendParam> @params, CancellationToken cancellationToken = default);
|
|
|
|
|
|
|
2026-06-22 16:56:05 +08:00
|
|
|
|
Task ReceiveAsync(string exchange, string queueName, string routingKey, Func<IChannel, BasicDeliverEventArgs, Task> callback, CancellationToken cancellationToken = default);
|
2026-06-11 17:01:24 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|