mongo数据库增加是否重缓存查询数据,增加随机修改删除状态接口;redis增加-队列消息读取封装方法

This commit is contained in:
2025-12-29 14:52:31 +08:00
committed by 张斌
parent cc67dd2485
commit 836460306e

View File

@@ -81,7 +81,7 @@ func GetReadStream(ctx context.Context, msg ...QueueMessage) error {
return nil return nil
} }
// GetReadFromStream 读取ReadFromStream数据 // GetReadFromStream 读取ReadFromStream数据
func GetReadFromStream(ctx context.Context, streamKey, groupName, consumerName string, count, blockMs int64, Block bool, fn func(ctx context.Context, message map[string]interface{}) error) (err error) { func GetReadFromStream(ctx context.Context, streamKey, groupName, consumerName string, count, blockMs int64, Block bool, fn func(ctx context.Context, message map[string]interface{}) error) (err error) {
glog.Infof(ctx, "初始化 Stream: %s, 消费者组: %s", streamKey, groupName) glog.Infof(ctx, "初始化 Stream: %s, 消费者组: %s", streamKey, groupName)
err = InitStreamGroup(ctx, streamKey, groupName) err = InitStreamGroup(ctx, streamKey, groupName)