Files
common/redis/message.go

14 lines
428 B
Go
Raw Normal View History

package redis
import "context"
type QueueMessage struct {
StreamKey string // Stream 键名
GroupName string // 消费者组名称
ConsumerName string // 消费者名称
BatchSize int64 // 最大并发数(信号量容量)
2025-12-31 10:46:39 +08:00
BlockMs int64 // 阻塞时间
2025-12-31 10:57:57 +08:00
AutoAck bool // ACK确认,true自动确认,false手动确认
HandleFunc func(ctx context.Context, message map[string]interface{}) error
}