15 lines
542 B
C#
15 lines
542 B
C#
|
|
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 queueName, Func<IChannel, BasicDeliverEventArgs, Task> callback, CancellationToken cancellationToken = default);
|
|||
|
|
}
|
|||
|
|
}
|