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

        Task ReceiveAsync(string exchange, string queueName, string routingKey, Func<IChannel, BasicDeliverEventArgs, Task> callback, CancellationToken cancellationToken = default);
    }
}
