using ASHermed.SinoInterface.Tools.Base;
using System;
using System.Collections.Generic;
using System.Text;

namespace ASHermed.SinoInterface.Api.IService.App
{
    public interface IRabbitMQService
    {
        /// <summary>
        /// 推送消息
        /// </summary>
        /// <typeparam name="T">消息model</typeparam>
        /// <param name="queue">队列名</param>
        /// <param name="msg">消息</param>
        /// <param name="timeTolive">消息重试间隔</param>
        void Publish<T>(RabbitMsgModel<T> pushModel, long timeTolive);
        /// <summary>
        /// 推送延时消息
        /// </summary>
        /// <typeparam name="T">消息model</typeparam>
        /// <param name="queue">队列名</param>
        /// <param name="msg">消息</param>
        /// <param name="delayTime">消息延时时间</param>
        /// <param name="timeTolive">消息重试间隔</param>
        void Publish<T>(RabbitMsgModel<T> pushModel, long delayTime, long timeTolive);
    }
}
