Documentation ¶
Index ¶
- Constants
- type Consumer
- type ConsumerOptions
- type Producer
- func (p *Producer) BatchPush(ctx context.Context, key string, msgList ...queue.Message) error
- func (c *Producer) Close() error
- func (c *Producer) DelayPush(ctx context.Context, key string, msg queue.Message, delaySeconds int64) error
- func (c *Producer) Push(ctx context.Context, key string, msg queue.Message) error
- type ProductOptions
- type QueueItem
Constants ¶
View Source
const (
DELAY_QUEUE_NAME = "glue:delayqueue:stream"
)
View Source
const (
Proto = "streamredis"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Consumer ¶
type Consumer struct { EnableDeadLetter bool //开启死信队列 DeadLetterQueue string // contains filtered or unexported fields }
Consumer Consumer
func NewConsumer ¶
NewConsumerByConfig 创建新的Consumer
type ConsumerOptions ¶
type ConsumerOptions struct { DeadLetterQueue string `json:"deadletter_queue" yaml:"deadletter_queue"` //开启死信队列 Concurrency int `json:"concurrency" yaml:"concurrency"` //并发的消费者数量 BufferSize int `json:"buffer_size" yaml:"buffer_size"` //队列长度 BlockingTimeout int `json:"blocking_timeout" yaml:"blocking_timeout"` //获取消息阻塞时间秒 VisibilityTimeout int `json:"visibility_timeout" yaml:"visibility_timeout"` //消息保留时间 秒 ReclaimInterval int `json:"reclaim_interval" yaml:"reclaim_interval"` //失败消息重试周期 GroupName string `json:"group_name" yaml:"group_name"` }
type Producer ¶
type Producer struct {
// contains filtered or unexported fields
}
Producer memcache配置文件
func NewProducer ¶
NewProducerByConfig 根据配置文件创建一个redis连接
type ProductOptions ¶
type QueueItem ¶
type QueueItem struct { QueueName string Concurrency int BufferSize int VisibilityTimeout time.Duration // contains filtered or unexported fields }
func (QueueItem) GetBufferSize ¶ added in v0.5.6
func (QueueItem) GetConcurrency ¶ added in v0.2.0
func (QueueItem) GetVisibilityTimeout ¶ added in v0.5.6
Click to show internal directories.
Click to hide internal directories.