/// <summary>
        /// 获取生产者对象
        /// </summary>
        /// <returns></returns>
        private ISubscriber GetSubscriber()
        {
            //redis管理对象
            var redis = ExchangeRedisManager.GetConnectionMultiplexer(GetRedisHost());

            //关闭消息有序传递,使消息并行传递
            redis.PreserveAsyncOrder = false;
            //返回生产者
            return(redis.GetSubscriber());
        }
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="dbIndex">数据库db访问索引</param>
 public ExchangeRedisHelper(int dbIndex = 0)
 {
     //实例化db
     db = ExchangeRedisManager.GetDatabase(dbIndex, GetRedisHost());
 }
 /// <summary>
 /// 无参构造函数
 /// </summary>
 public ExchangeRedisHelper()
 {
     //实例化db
     db = ExchangeRedisManager.GetDatabase(0, GetRedisHost());
 }