namespace WIDESEAWCS_RedisService.PubSub
{
public interface IMessageQueueService
{
///
/// 发布消息
///
long Publish(string channel, string message);
///
/// 订阅频道
///
void Subscribe(string channel, Action handler);
///
/// 取消订阅
///
void Unsubscribe(string channel);
///
/// 推送消息到可靠队列(List)
///
long Enqueue(string queueName, string message);
///
/// 从可靠队列弹出消息
///
string? Dequeue(string queueName, TimeSpan? timeout = null);
///
/// 获取队列长度
///
long GetQueueLength(string queueName);
}
}