Files
QYZH.InteractiveMagazine/QYZH.InteractiveMagazine.Infrastructure/RabbitMQ/IRabbitMQService.cs

15 lines
578 B
C#
Raw Normal View History

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