Transfer.Redis - dotnet-shashlik/shashlik.eventbus GitHub Wiki

RedisStream

Nuget: Shashlik.EventBus.Redis

Shashlik.EventBus.Redis使用FreeRedis作为基础工具包。

注册RedisStream消息传输

        /// <summary>
        /// 配置RedisStream
        /// </summary>
        /// <param name="eventBusBuilder"></param>
        /// <param name="action"></param>
        /// <returns></returns>
        public static IEventBusBuilder AddRedisMQ(this IEventBusBuilder eventBusBuilder, Action<EventBusRedisMQOptions>? action = null)

配置项

  • RedisClientFactory:RediClient实例获取工厂方法,默认ServiceProvider.GetService<RedisClient>();
  • MaxLength:消息堆积最大数量,默认0不限制
  • MaxLengthFactory:消息堆积最大数量动态配置器,优先级比MaxLength更高,这个可以根据不同的事件配置不同的堆积数量
⚠️ **GitHub.com Fallback** ⚠️