Files
parr_api/PARR.BLL/Services/Interfaces/IMqService.cs

30 lines
1.2 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using PARR.BLL.Contracts.Interfaces;
using PARR.BLL.Domain.Mq;
namespace PARR.BLL.Services.Interfaces
{
public delegate Task MqMessageHandlerDelegate(string msg);
public interface IMqService : IAsyncDisposable // IDisposable
{
Task<bool> InitConsumerAsync(IMqSettings mqSettings, MqMessageHandlerDelegate messageHandler);
/// <summary>
/// Отправить сообщение в очередь используя список строк
/// !!! Избавиться от этого метода, вместо него использовать со списком объектов !!!
/// </summary>
/// <param name="mqSettings"></param>
/// <param name="msgList"></param>
/// <returns></returns>
Task<MqSendResult> SendAsync(IMqSettings mqSettings, string[] msgList);
/// <summary>
/// Отправить сообщение в очередь используя список объектов
/// </summary>
/// <param name="mqSettings"></param>
/// <param name="msgObjectList"></param>
/// <returns></returns>
Task<MqSendResult> SendAsync(IMqSettings mqSettings, List<object> msgObjectList);
}
}